Reputation:
I tried to make a JFrame with netbeans IDE and all the code has no error, when I try to run the application the Frame is not visible. what is the problem?
Upvotes: 1
Views: 12800
Reputation: 1
After i tried all the solutions and nothing worked, i copied individual objects like buttons and text boxes into a new form and running the form after each addition. It finally worked.
Upvotes: -2
Reputation: 2075
Before you do
setVisible(true);
Make sure that you made a constructor like:
public YourFrame(){
setVisible(true);
}
I hope this helps you.
Upvotes: 1
Reputation: 2075
I'm sure you forgot to write this code:
setVisible(true);
Upvotes: 3