/* * ========================================================== * TestFrame.java : Create a Frame that has no functionality. * Useful, huh. * ========================================================== */ import java.awt.*; public class TestFrame extends Frame { // The main method creates an instance of the class. public static void main( String args[] ) { TestFrame t = new TestFrame(); } public TestFrame() { // Define window Frame. /* Define I/O components */ // Source code for I/O components goes here .... /* Initialize and display Frame */ setTitle("Simple Frame Interface"); // Set Frame title. setSize(400,120); // Set the Frame size. show(); // Display the Frame. } public void paint (Graphics g) { // Method for painting // Source code for painting on the frame goes here .... } } class QuitListener extends MouseAdapter { // Source code for handling of mouse events goes here .... } class CelListener extends KeyAdapter { // Source code for handling of keyboard events goes here .... }