Name convention on Java Swing components(prefix)

后端 未结 4 1104
忘掉有多难
忘掉有多难 2021-02-06 00:46

An question that was brought to my mind when programming with Swing in Java was, is it a recommendation or an \"official\"/most used naming convention(prefix) on Swing component

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-06 01:11

    • btn - JButton
    • chk - JCheckBox
    • clr - JColorChooser
    • cmb - JComboBox
    • ico - JDesktopIcon
    • edt - JEditorPane
    • fch - JFileChooser
    • ifr - JInternalFrame
    • lbl - JLabel
    • lyp - JLayeredPane
    • lst - JList
    • mnu - JMenuBar
    • mni - JMenuItem
    • opt - JOptionPane
    • pnl - JPanel
    • pmn - JPopupMenu
    • prg - JProgressBar
    • rad - JRadioButton
    • rot - JRootPane
    • scb - JScollBar
    • scr - JScrollPane
    • spr - JSeparator
    • sld - JSlider
    • spn - JSpinner
    • spl - JSplitPane
    • tab - JTabbedPaneJTable
    • tbl - JTable
    • tbh - JTableHeader
    • txa - JTextArea
    • txt - JTextField
    • txp - JTextPane
    • tgl - JToggleButton
    • tlb - JToolBar
    • tlt - JToolTip
    • tre - JTree
    • vpr - JViewport

    source -: http://zuskin.com/java_naming.htm

提交回复
热议问题