user2255507
user2255507

Reputation:

JFrame visibility

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

Answers (3)

Frank Fareed
Frank Fareed

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

Abdelrahman Wahdan
Abdelrahman Wahdan

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

Abdelrahman Wahdan
Abdelrahman Wahdan

Reputation: 2075

I'm sure you forgot to write this code:

setVisible(true);

Upvotes: 3

Related Questions