NetBeans background color doensn't work for applets

Discussion in 'Java' started by NickPick, Mar 3, 2009.

  1. NickPick

    NickPick Guest

    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
    NickPick, Mar 3, 2009
    #1
    1. Advertising

  2. 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.
    Thomas Kellerer, Mar 3, 2009
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    2,209
  2. KL
    Replies:
    1
    Views:
    566
    eb303
    Apr 20, 2010
  3. fig000
    Replies:
    0
    Views:
    4,529
    fig000
    Sep 6, 2004
  4. Kamaljeet Saini
    Replies:
    0
    Views:
    377
    Kamaljeet Saini
    Feb 13, 2009
  5. Replies:
    1
    Views:
    257
    marss
    Feb 14, 2007
Loading...

Share This Page