This week's book giveaway is in the Android forum.
We're giving away four copies of Android Programming: The Big Nerd Ranch Guide and have Bill Phillips & Chris Stewart on-line!
See this thread for details.
Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Applet Background Color  RSS feed

 
Joel Christophel
Ranch Hand
Posts: 250
1
Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!