wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Applet BackGround Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Applet BackGround" Watch "Applet BackGround" New topic
Author

Applet BackGround

Angela Jessi
Ranch Hand

Joined: Nov 27, 2000
Posts: 428
Hi,
How to set up the background color of an applet ? Default is skycolor. If I want to change to white. Which method I have to use for it? Plz explain by syntax
Thanks in advance,
angela
Stephanie Grasson
Ranch Hand

Joined: Jun 14, 2000
Posts: 347
Angela,
This little applet demonstrates changing the background color from skycolor to white and back.

Hope this helps.
Stephanie
usman ahmad
Ranch Hand

Joined: Mar 06, 2001
Posts: 46

OR

In the paint() method you can use like this
<pre>
public void paint(Graphics g)
{
setbackground(Color.anycolor);
}
</pre>
Where anycolor can be white,red,blue etc.
I hope this will be helful too.
Regards,
Usman
Angela Jessi
Ranch Hand

Joined: Nov 27, 2000
Posts: 428
Thanks Usman,
Angela
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Applet BackGround
 
Similar Threads
setting applet's background color
Background Color
want background image in applet
background
applet in frame