File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Applet BackGround" Watch "Applet BackGround" New topic

Applet BackGround

Angela Jessi
Ranch Hand

Joined: Nov 27, 2000
Posts: 428
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,
Stephanie Grasson
Ranch Hand

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

Hope this helps.
usman ahmad
Ranch Hand

Joined: Mar 06, 2001
Posts: 46


In the paint() method you can use like this
public void paint(Graphics g)
Where anycolor can be white,red,blue etc.
I hope this will be helful too.
Angela Jessi
Ranch Hand

Joined: Nov 27, 2000
Posts: 428
Thanks Usman,
I agree. Here's the link:
subject: Applet BackGround
jQuery in Action, 3rd edition