Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2010
    Posts
    6
    Rep Power
    0

    Default Change background of main window in netbeans platform application

    Hi all,
    I am developing my application using Netbeans Platform Application. I want to change the default gray background of the main window with any other color in the application. i.e. I want to change the look of main window..How to do it as there is no file or i am not getting the file to change such property... Please help. Thanx in advance.

  2. #2
    bassfero is offline Member
    Join Date
    Jul 2010
    Posts
    22
    Rep Power
    0

    Default

    simply open your class via netbeans, click design button, right click on the frame you want to change color, properties and background

    you can set any color you like there, or bind it to another component

    or in the constructor of frame you can add
    Java Code:
    this.setBackground(new Color(float1,float2,float3));
    Last edited by bassfero; 09-07-2010 at 10:27 AM.

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    You can do this in code level manually, or using the properties window. Did you check the option in that property window?

  4. #4
    Join Date
    Sep 2010
    Posts
    6
    Rep Power
    0

    Default

    Thanks for reply Eranga and bassfero.
    I want to change color of Window which is appear when you run the application created in Netbeans Platform Application without including any module in it. This window is having default Menu Bar and Toolbar and simple max,min and close buttons(Netbeans Platform Application is providing all these things). So, can anybody tell me how to do it?

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

  6. #6
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

  7. #7
    Join Date
    Sep 2010
    Posts
    6
    Rep Power
    0

    Default

    Thanks for reply. I will try your solution. Once again thanks

  8. #8
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

Similar Threads

  1. Change JPanel background after its been set once
    By mevets in forum AWT / Swing
    Replies: 4
    Last Post: 04-14-2010, 02:07 AM
  2. JFrame window doesnt change background color
    By Addez in forum New To Java
    Replies: 7
    Last Post: 11-07-2009, 10:38 PM
  3. change url in parent window from child window
    By rakesh_n_mehta in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 07-09-2009, 01:17 PM
  4. change viewing platform orientation
    By Bit2_Gosu in forum New To Java
    Replies: 1
    Last Post: 02-15-2009, 09:46 AM
  5. window background color?
    By javan00b in forum New To Java
    Replies: 3
    Last Post: 01-29-2008, 11:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •