IntelliJ Java IDE
The moose likes Applets and the fly likes Applet Background Color Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Applets
Reply Bookmark "Applet Background Color" Watch "Applet Background Color" New topic
Author

Applet Background Color

Joel Christophel
Greenhorn

Joined: Apr 20, 2011
Posts: 26
Okay, when I use the setBackground() method to change the color of the background, nothing happens. Instead, my background is transparent. Why is this happening?

Here's my code:
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 3214

Read the API for JApplet, particularly the second paragraph of the class description. Then observe that there is a "See Also" link. Click that link and go through the API documentation for the interface.

After that, go through the tutorial on Performing Custom Painting where you wilkl learn the correct way to do this in Swing.

luck, db
There are no new questions, but there may be new answers.
 
jQuery in Action, 2nd edition
 
subject: Applet Background Color
 
Threads others viewed
Draw Triangle
Case statement
Recursion SnowFlake ?
Problem with java layout and panels and containers
quadruple
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture