An Introduction to Graphical User Interface (GUI) Technology
With Examples in Java |
Prof. David Bernstein |
Computer Science Department |
bernstdh@jmu.edu |
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