Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > NetBeans background color doensn't work for applets

Reply
Thread Tools

NetBeans background color doensn't work for applets

 
 
NickPick
Guest
Posts: n/a
 
      03-03-2009
When I set a background color for an applet in NetBeans it is
displayed correctly in the GUI but once the applet is compiled and
run, everything is displayed in the original light gray background.

setBackground(new java.awt.Color(211, 220, 230)); // seems to be
without any effect.

Any idea what the problem might be?

tx
 
Reply With Quote
 
 
 
 
Thomas Kellerer
Guest
Posts: n/a
 
      03-03-2009
NickPick, 03.03.2009 14:50:
> When I set a background color for an applet in NetBeans it is
> displayed correctly in the GUI but once the applet is compiled and
> run, everything is displayed in the original light gray background.
>
> setBackground(new java.awt.Color(211, 220, 230)); // seems to be
> without any effect.
>
> Any idea what the problem might be?
>

Whether a component honors the setBackground() or not depends on the look and feel that is used.
At least this is my experience with "regular" Swing applications. Don't know if this applies to an Applet as well.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing font color from current font color to black color Kamaljeet Saini Ruby 0 02-13-2009 04:58 PM
rounded corners in which my border color is different than the background color laredotornado@zipmail.com Javascript 1 02-14-2007 07:37 AM
NetBeans: Problem with JFrame background color KRouane@gmail.com Java 2 03-08-2006 02:17 PM
Problem with setting background color alternating item in datalist to a certain color fig000 ASP .Net Web Controls 0 09-06-2004 06:51 PM
Building a GUI using NetBeans platform (not Netbeans IDE !) Pimousse Java 2 04-21-2004 07:22 AM



Advertisments