Home Here you can view your subscribed threads, work with private messages and edit your profile and preferences Registration is free! Frequently Asked Questions Search

HardwareDude.com Forum Index -> 3rd Party Software Disucssion

How can I change the gray background of an applet?


Post new topic   Reply to topic

  Author    Thread
sri
Moderator
Moderator


Joined: 28 Jan 2006
Posts: 381
Location: Hyderabad , India


 Reply with quote  
How can I change the gray background of an applet?

How can I change the gray background of an applet?
Applets use a default background of gray, which isn't very visually appealing, and very infrequently matches the background of the web page on which it is loaded. So unless you repaint the background yourself in the paint() method of your applet, you'll want to change its background as soon as the applet loads.
The best place to do it will be in your init() method. This means the applet will change color once it has finished loading. To change background color, you need to invoke the setBackground(Color) method. It accepts as a parameter any valid Color
public void init()
{
setBackground ( Color.black );
}

- srikanth dhanwada

Post Wed Feb 08, 2006 9:26 pm 
 
  Display posts from previous:      



Post new topic   Reply to topic
Page 1 of 1



Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 



-Your Link Here-
Networking hardware and software solutions | web hosting directory | Web hosting and domain talk
Powered by phpBB: © 2008 HardwareDude.com | SiteMap |Privacy | Terms of Service
Powered By :