GUI design

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hhhhhhhh
    New Member
    • Oct 2007
    • 12

    GUI design

    Hi all friends,
    I am designing simple GUI application. How do I change the background color?
    I did change the background color in the design mode. When I run the app, I did not see the color I chose. Please help.
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by hhhhhhhh
    Hi all friends,
    I am designing simple GUI application. How do I change the background color?
    I did change the background color in the design mode. When I run the app, I did not see the color I chose. Please help.
    Perhaps you changed some other color (font color perhaps) instead of the background color. Was this a JFrame's background color? Which IDE are you using and how did you change the color?

    Comment

    • JoeMac3313
      New Member
      • Jul 2007
      • 16

      #3
      Component.setBa ckground(Color c)

      for example

      // import needed to use Color
      import java.awt.Color



      JPanel panel = new JPanel();

      panel.setBackgr ound(Color.GREE N);

      Comment

      • hhhhhhhh
        New Member
        • Oct 2007
        • 12

        #4
        Thanks,

        I use JFrame and NetBeans and I change color from the design mode (Properties windows on the right side)

        Comment

        Working...