aspose file tools
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
Ranch Hand

Joined: Apr 20, 2011
Posts: 119

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: 4163
    
    3

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.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Applet Background Color
 
Similar Threads
Problem with java layout and panels and containers
quadruple
Case statement
Draw Triangle
Recursion SnowFlake ?