943,650 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 524
  • Java RSS
Aug 8th, 2008
0

how to cheange the color in the background.

Expand Post »
hey

is anyone know how to change background color when you click a button.... please tell me. im creating a applet.. need sup
Reputation Points: -1
Solved Threads: 4
Junior Poster in Training
lich is offline Offline
78 posts
since May 2008
Aug 8th, 2008
0

Re: how to cheange the color in the background.

Click to Expand / Collapse  Quote originally posted by lich ...
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...

java Syntax (Toggle Plain Text)
  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. }
Reputation Points: 392
Solved Threads: 108
Posting Shark
Alex Edwards is offline Offline
971 posts
since Jun 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: sorting with hashmap
Next Thread in Java Forum Timeline: getResourceAsStream vs getResource





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC