This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Swing components not shown

 
Ashok Pradhan
Ranch Hand
Posts: 180
Eclipse IDE Firefox Browser Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created a JFrame in which a JPanel and some JLabel,JPasswordField and JButton is added when I run my program my App does not show some of the components,when I minimize it and again restore it then it shows all the components and OK.

My program is:


My System Config is:

Win XP,JDK 1.6

"I don't understand what is the problem with my program it works when I minimize and restore it"

Please someone help me
 
Maneesh Godbole
Saloon Keeper
Posts: 11070
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make the last statement in your run() method.

In principle, you create a frame/container, add its children and then make it visible.
 
Ashok Pradhan
Ranch Hand
Posts: 180
Eclipse IDE Firefox Browser Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks now it works,I got it!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic