File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Change Background color on button Click Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Change Background color on button Click" Watch "Change Background color on button Click" New topic
Author

Change Background color on button Click

khushbushah shah
Greenhorn

Joined: Jun 25, 2012
Posts: 10
Hi

I want to change Background color of Jpanel and its font on button click.

Can anyone tell me what i am doing wrong?
Here is the code:
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> I want to change Background color of Jpanel and its font on button click.

how does the button know you want to do that?
khushbushah shah
Greenhorn

Joined: Jun 25, 2012
Posts: 10
hi,

When user Clicked on button action event will called from test3 class
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> When user Clicked on button action event will called...

how does the button know about the action event?
 
GeeCON Prague 2014
 
subject: Change Background color on button Click