Five layouts: Flow layout (flowlayout) boundary layout (borderlayout) grid layout (GridLayout) common three card layout (cardlayout) grid package layouts (gridbaglayout) Two types of JFrame that are not commonly used Form (default BorderLayout layout) JPanel panel (default flowlayout layout) JButton button Jradiobutton Radio box (be sure to place a single selection in Buttongroup to form mutual exclusion) Jcheckbox check box JLabel label JTextField text box JTextArea multiline text field (must be placed in JScrollPane to form a scrolling effect) JScrollPane scroll panel jlist Multi-line display (also put in JScrollPane to form a scrolling effect) jcombobox<string> drop-down box (inside an array) jpasswordfield Password box jsplitpane split pane JTabbedPane tab joptionpane the message prompt panel (for example: Joptionpane.showmessagedialog (this/* refers to the current form */, "input box cannot be empty! ) JMenuBar menu bar Component (This.setjmenubar ()/* menu added to form */) JMenu Menu Component JMenuItem menu item component JMenu inside can be nested jmenu ()//Two-level menu JToolBar container class component T His.seticonimage (New ImageIcon ("Images/note.png"). GetImage ())//Set title picture//More please do your own research
Swing components commonly used in Java (2013-10-27-163 write log migrations