So I'm trying to code a swing application, but regardless of what I try I can't seem to get it to work. Despite any background chnages, or components added all I see is a big grey JFrame. When it's first created I'll see my chosen background color flash by before it becomes a featurelss grey frame.
For testing I've created this fairly simple app.
Am I just making some obvious mistake or does this work for everyone else? For the record I'm using visual J++ on winXP Pro. I've also tried it in forte 3.0.
Thanks for your help
Brian
For testing I've created this fairly simple app.
Code:
import javax.swing.*;
import java.awt.*;
public class testJFrame
{
public static JFrame myJFrame = new JFrame("Test JFrame");
public static void main(String[] args)
{
myJFrame.setSize(500,200);
myJFrame.setBackground(Color.red);
myJFrame.setVisible(true);
}
}
Am I just making some obvious mistake or does this work for everyone else? For the record I'm using visual J++ on winXP Pro. I've also tried it in forte 3.0.
Thanks for your help
Brian
\cpsc11\\game.gif");