Results 1 to 3 of 3
Like Tree2Likes
  • 1 Post By kneitzel
  • 1 Post By JosAH

Thread: Changing the color of windows

  1. #1
    Zarah is offline Senior Member
    Join Date
    Mar 2014
    Posts
    286
    Rep Power
    6

    Default Changing the color of windows

    Hi,

    In the image, the color of the frame of the window/JFrame is black. My question is that can we set the color of this frame, or is it just provided by the operating system and whatever color is default color of windows in an operating system will appear in our application?

    Note:- I am talking about the frame, the boundary in the JFrame container which contains the close, maximize, and minimize buttons.


    Changing the color of windows-black-window-frsame.jpg

    I know my question must sound very dumb, and I am sorry but I needed to ask this!

  2. #2
    kneitzel is offline Senior Member
    Join Date
    Feb 2014
    Posts
    447
    Rep Power
    6

    Default Re: Changing the color of windows

    Hi,

    Your question is not dumb at all and you got the correct ideas.

    The handling of windows is done by the windowing system / operating system. It offers some interfaces that should make it easy for a developer to create applications. The complexity of the frame is normally hidden away. It is also something that is not wanted because it could easily confuse users.

    There might be solutions with jni. But no simple 'Java' way. To have a Java only way, oracle need to build code for all window managers on Linux but there are hundreds ....

    I hope this helped a little bit to clarify this point.

    Konrad
    Zarah likes this.

  3. #3
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,422
    Blog Entries
    7
    Rep Power
    28

    Default Re: Changing the color of windows

    It's an L&F (Look and Feel) issue. You can install an L&F for the Swing components and some of those L&Fs are adjustable. Google is your friend here (look for 'Nimbus').

    kind regards,

    Jos
    Zarah likes this.
    Build a wall around Donald Trump; I'll pay for it.

Similar Threads

  1. Changing Image color
    By Frecow in forum Java 2D
    Replies: 0
    Last Post: 04-04-2011, 11:16 AM
  2. Changing background color
    By nikkka in forum New To Java
    Replies: 4
    Last Post: 03-12-2011, 06:54 AM
  3. Changing text color in SWT
    By ourimaler in forum SWT / JFace
    Replies: 1
    Last Post: 06-02-2010, 02:08 PM
  4. Color-changing model
    By higuchi in forum New To Java
    Replies: 1
    Last Post: 03-19-2009, 08:29 AM
  5. Changing the color of text
    By Lang in forum New To Java
    Replies: 1
    Last Post: 11-04-2007, 10:51 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
  •