Swing components commonly used in Java (2013-10-27-163 write log migrations

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.