how to cheange the color in the background.

Reply

Join Date: May 2008
Posts: 65
Reputation: lich has a little shameless behaviour in the past 
Solved Threads: 4
lich lich is offline Offline
Junior Poster in Training

how to cheange the color in the background.

 
0
  #1
Aug 8th, 2008
hey

is anyone know how to change background color when you click a button.... please tell me. im creating a applet.. need sup
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 973
Reputation: Alex Edwards is a jewel in the rough Alex Edwards is a jewel in the rough Alex Edwards is a jewel in the rough Alex Edwards is a jewel in the rough 
Solved Threads: 107
Alex Edwards's Avatar
Alex Edwards Alex Edwards is offline Offline
Posting Shark

Re: how to cheange the color in the background.

 
0
  #2
Aug 8th, 2008
Originally Posted by lich View Post
hey

is anyone know how to change background color when you click a button.... please tell me. im creating a applet.. need sup
Within applet context...

  1. //assuming Applet context
  2.  
  3. // assuming button has the listener registered with this overridden method--
  4. public void actionPerformed(ActionEvent e){
  5.  
  6. getContentPane().setBackground(new Color(200, 100, 50));
  7.  
  8. }
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Java Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC