I'm trying to do a Trail on the JAVA website:
http://java.sun.com/docs/books/tutorial/uiswing/painting/step1.html
I have two classes: main, and SwingPaintDemo1. I'm trying to instantiate SwingPaintDemo1 when main is called and have it draw a window to the screen. Nothing appears...
package rpg;
public class main {
public static void main(String[] args) {
SwingPaintDemo1 f = new SwingPaintDemo1();
}
}
package rpg;
import javax.swing.SwingUtilities;
import javax.swing.JFrame;
public class SwingPaintDemo1 {
public void SwingPaintDemo1() {
createAndShowGUI();
}
private static void createAndShowGUI() {
JFrame f = new JFrame("Swing Paint Demo");
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setSize(500,500);
f.setVisible(true);
}
}