Hour 16. Building a Complex User Interface

Creating a graphical user interface with Swing involves more than learning how to use the different interface components, layout managers, and event-handling methods. You also have to spend some time familiarizing yourself with everything that Swing offers. More than 400 different classes make Swing's javax.swing library and other related libraries the most extensive in Java 2. Many of these classes can be implemented using the same techniques you have used in the preceding three hours—all Swing containers and components share superclasses with each other, which gives them common behavior. During this hour, you will learn about some additional components that you can use in your Swing programs:

  • Scroll panes— Containers that add support for vertical and horizontal scrolling to other components
  • Sliders— Components that can be used to select a number within a range of numbers
  • Change listeners— Objects that can monitor changes in sliders
  • Image icons— Graphics that can be used on labels, buttons, and other components
  • Toolbars— Containers that can be moved around to different parts of an interface
  • Menu bars, menus, and menu items— Two containers and a component used to create pull-down menus
      
Comments