NetBeans background color doensn't work for applets

N

NickPick

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
 
T

Thomas Kellerer

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,062
Latest member
OrderKetozenseACV

Latest Threads

Top