advanced gui components in java
DESCRIPTION
Advanced GUI Components in JAVA. Eric Stokes, Matt Behling. Advanced Layout Managers. GridbagLayout CardLayout SpringLayout. GridBagLayout. Advanced Layout Versatile U ses constraints to define positions. CardLayout. Similar to using tabbed panes - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Advanced GUI Components in JAVA](https://reader033.vdocument.in/reader033/viewer/2022061615/56816764550346895ddc41d1/html5/thumbnails/1.jpg)
Advanced GUI Components in JAVA
Eric Stokes, Matt Behling
![Page 2: Advanced GUI Components in JAVA](https://reader033.vdocument.in/reader033/viewer/2022061615/56816764550346895ddc41d1/html5/thumbnails/2.jpg)
GridbagLayoutCardLayoutSpringLayout
Advanced Layout Managers
![Page 3: Advanced GUI Components in JAVA](https://reader033.vdocument.in/reader033/viewer/2022061615/56816764550346895ddc41d1/html5/thumbnails/3.jpg)
GridBagLayout•Advanced Layout•Versatile•Uses constraints to define positions
![Page 4: Advanced GUI Components in JAVA](https://reader033.vdocument.in/reader033/viewer/2022061615/56816764550346895ddc41d1/html5/thumbnails/4.jpg)
CardLayout•Similar to using tabbed panes•Gives the illusion of “hiding” and “showing components”•Keeps the state of components since it simply hides an entire JPanel•Can Use multiple switching components such as JMenu or JComboBox
![Page 5: Advanced GUI Components in JAVA](https://reader033.vdocument.in/reader033/viewer/2022061615/56816764550346895ddc41d1/html5/thumbnails/5.jpg)
SpringLayout•Rudimentary layout•Not recommended for hand coding•Components are defined by their relationships to other components
![Page 6: Advanced GUI Components in JAVA](https://reader033.vdocument.in/reader033/viewer/2022061615/56816764550346895ddc41d1/html5/thumbnails/6.jpg)
Tabbed PanesJMenuButtons With Icons
Other GUI Components
![Page 7: Advanced GUI Components in JAVA](https://reader033.vdocument.in/reader033/viewer/2022061615/56816764550346895ddc41d1/html5/thumbnails/7.jpg)
Similar Behavior to CardLayout with a tab interface
Allows the use of Icons the same as JButtons
Tabbed Panes
![Page 8: Advanced GUI Components in JAVA](https://reader033.vdocument.in/reader033/viewer/2022061615/56816764550346895ddc41d1/html5/thumbnails/8.jpg)
Icons can be added to a buttonThe Icon is defaulted to the Left of text
Jbuttons and Icons
![Page 9: Advanced GUI Components in JAVA](https://reader033.vdocument.in/reader033/viewer/2022061615/56816764550346895ddc41d1/html5/thumbnails/9.jpg)
Creates a menu similar to many applicationsUseful for saving, loading, new, functions that
would be accessed from many different parts of an application
Menus created from top down, Create MenuBar, then Menu, then MenuItem
Also Allows Icons
JMenu