aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes DIsplay on button click Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "DIsplay on button click" Watch "DIsplay on button click" New topic
Author

DIsplay on button click

Angel Kal
Greenhorn

Joined: Dec 11, 2011
Posts: 17

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

Joined: Oct 31, 2012
Posts: 175
    
    1

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-X
Ramesh Pramuditha Rathnayake
Ranch Hand

Joined: Oct 31, 2012
Posts: 175
    
    1

You have not used java standards while coding. Please use them for better understanding..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: DIsplay on button click