Java Reference
In-Depth Information
}
public static void main(String[] arguments) {
Display ds = new Display();
}
}
What statement needs to replace
// answer goes here
to make the application function
properly?
a.
setSize(300, 200);
b.
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
c.
Display ds = new Display();
d.
No statement is needed.
The answer is available on the topic's website at
http://www.java21days.com.
Visit the
Day 9 page and click the Certification Practice link.
To extend your knowledge of the subjects covered today, try the following exercises:
1.
Create an application with a frame that includes several VCR controls as individual
components: play, stop/eject, rewind, fast forward, and pause. Choose a size for the
window that enables all the components to be displayed on a single row.
2.
Create a frame that opens a smaller frame with fields asking for a username and
password.
Where applicable, exercise solutions are offered on the topic's website at
http://www.