Java Reference
In-Depth Information
mainframes in the marketplace has diminished, and IBM, while still a large and
resourceful company, no longer dominates the computer market.
Mainframes are still in use today for two reasons. They still excel at handling large
data volumes. More importantly, the programs that control the business data have
been refined over the last 30 or more years, fixing one problem at a time. Moving
these programs to less expensive computers, with different languages and operating
systems, is difficult and error-prone. In the 1990s, Sun Microsystems, a leading
manufacturer of workstations and serversȌand the inventor of JavaȌwas eager to
prove that its mainframe system could be Ȓdownsizedȓ and replaced by its own
equipment. Sun eventually succeeded, but it took over five yearsȌfar longer than it
expected.
57
58
2.11 Graphical Applications and Frame Windows
This is the first of several sections that teach you how to write graphical applications:
applications that display drawings inside a window. Graphical applications look more
attractive than the console applications that show plain text in a console window.
The material in this section, as well as the sections labeled ȒGraphics Trackȓ in other
chapters, are entirely optional. Feel free to skip them if you are not interested in
drawing graphics.
A graphical application shows information inside a frame window: a window with a
title bar, as shown in Figure 21 . In this section, you will learn how to display a frame
window. In Section 3.9 , you will learn how to create a drawing inside the frame.
To show a frame, construct a JFrame object, set its size, and make it visible.
To show a frame, carry out the following steps:
1. Construct an object of the JFrame class:
JFrame frame = new JFrame();
2. Set the size of the frame
frame.setSize(300, 400);
Search WWH ::




Custom Search