|
Creating "Nifty" Assignments for Java Programming Courses
and a Discussion of the Necessary Aspects of Java |
|
Prof. David Bernstein |
| Computer Science Department |
| bernstdh@jmu.edu |
Graphical User Interfaces
JFrame
import java.awt.*;
import javax.swing.*;
/**
* An example that uses a JFrame
*
* @version 1.0
* @author Prof. David Bernstein, James Madison Univeristy
*/
public class JFrameDriver
{
/**
* The entry point of the example
*
* @param args The command line arguments
*/
public static void main(String[] args)
{
JFrame f;
f = new JFrame();
f.setSize(400,400);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setVisible(true);
}
}
The "Graph Paper" Approach