This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 169
    
    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: 169
    
    1

You have not used java standards while coding. Please use them for better understanding..
 
jQuery in Action, 2nd edition
 
subject: DIsplay on button click
 
Similar Threads
I want help with display
Alignment Issue
radiobuttons changing background color
Multiple controls in a panel
refresh JPanel containing JTable