Java Reference
In-Depth Information
Chapter 16
Getting in the Swing of Things:
Designing a GUI for BudgetPro
Sometimes you gotta have a GUI; even we will admit that command lines only
go so far. When it comes to simple interactions with casual users, a Graphical
User Interface is a great step forward . . . if it's done well. The toolkit for
building such an interface with Java is called Swing. The original Java toolkit
is AWT (A Windowing Toolkit), and is still in use, but much less attractive.
We'll take a quick look at some major pieces of Swing, and show a complete
example—a GUI for our budget application. After this example, you will have
the tools you need to construct some real GUIs on your own.
16.1
W HAT Y OU W ILL L EARN
• The Swing GUI paradigm.
• A simple standalone Swing application.
• Some basic Swing objects—buttons and labels.
• A bit about layout managers.
• A more complex object—the JTable .
341
Search WWH ::




Custom Search