Click here to Skip to main content
15,909,373 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to my gui to popup, I am building subway program where it supposed to simulate the event that create a subway sandwich which required u to create a gui and to which i have already but I want it to run/popup. I would like to see how it is but for some reason, I am missing something, so here the code that I used, can some one tell me what I am missing here. The codes below is what i have tried so far.




do I need to extend the jframe or something.

What I have tried:

public static void main(String[]args){


           JFrame frame = new JFrame("Test Frame");
           frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
           frame.setVisible(true);
           frame.setBackground(Color.green);

        }
Posted
Updated 17-May-21 1:10am

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900