Hour 13. Building a Simple User Interface

What You’ll Learn in This Hour:

• Creating user interface components such as buttons

• Creating labels, text fields, and other components

• Grouping components together

• Putting components inside other components

• Opening and closing windows

Things are going to get pretty gooey during this hour. You will make an enormous mess creating your first graphical user interface (GUI) with Java.

Computer users have come to expect their software to feature a GUI, take user input from a mouse, and work like other programs. Although some users still work in command-line environments such as MS-DOS or a Linux shell, most would be confused by software that does not offer a point-and-click, drag-and-drop graphical interface like in Microsoft Windows or MacOS.

Java supports this kind of software with Swing, a collection of Java classes that represent all the different buttons, text fields, sliders, and other components that can be part of a GUI, as well as the classes needed to take user input from those components.

During this hour and the next, you create and organize GUIs in Java. Afterward in Hour 15, “Responding to User Input,” you enable those interfaces to receive mouse clicks and other user input.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.83.199