I'm just starting out in java and have run into a problem. I am using the Netbeans IDE, selected a new project > Java Application Then added a new file from Swing GUI Forms > JApplet Form, then popped a few items on the form a button and label just to test.
The problem is i can't get the form to load in the main method of main.java when i compile
In vb.net this would be:
but i'm just learning java and can't figure the appropriate form show method out.
Dim Form as new Form1
Could someone tell the code to show this form when the prgram is compiled?
What is "the form"? Is it a java class like JFrame? or some extension of the Window class?
Have you read the API doc for the class to see if any of its methods would show it or make it visible. (hint visible is the term used)
Does your textbook have any example programs? Any of them with GUI will have the necessary code.
it's just a JFrame, how do i make it visible from the mianmethod in the main class?
Create a new instance of it and call the method to make it visible.
Do you have any sample code for a program using GUI?