Adding User Controls

     

Adding User Controls

Components .listImportantElements() {

//returns:

  • JButton A button that shows text and can do something when you click it.

  • JLabel An element used generally for holding textual messages.

  • JTextField Like an HTML <input> , this component allows the user to enter text.

  • JEditorPane This lets the user enter text or display text-based files.

  • JScrollPane A container that scrolls . Use it by creating content in a different panel and then adding that panel to the scroll pane.

  • JTabbedPane A container that holds tabbed panes.

 

 /* 

Let's talk about a few different, important Swing components in turn . They're just objects, so after you are familiar with their general behavior, you can create them, call setX() methods on them to specify their particulars, add an event handler if necessary, and add them to the content pane.

 

 */ } 



Java Garage
Java Garage
ISBN: 0321246233
EAN: 2147483647
Year: 2006
Pages: 228
Authors: Eben Hewitt

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net