Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DIsplay on button click

 
Angel Kal
Greenhorn
Posts: 17
Chrome Netbeans IDE Windows Vista
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone tell me why this is not adding my JLabel to the north panel when the color button is selected? Lines 59 & 69

 
Ramesh Pramuditha Rathnayake
Ranch Hand
Posts: 178
2
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can see an error that you have done.


You have not writen removeAll() method. As in your code, when you click on the button, each time this will add the JLabel to northPanel.

After you have clicked the button and changed the window state you can see the corrected panel. But I also don't know a way to do that in the program.

I used repaint() method and update() method. But no change..!
I think some one will help...
 
Ramesh Pramuditha Rathnayake
Ranch Hand
Posts: 178
2
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have not used java standards while coding. Please use them for better understanding..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic