Results 1 to 5 of 5
  1. #1
    chyrl is offline Senior Member
    Join Date
    Mar 2010
    Location
    Manila, Philippines
    Posts
    257
    Rep Power
    5

    Exclamation How to change the Look & Feel Layout

    I was learning how to apply my Key Combination to work.
    camickr posted a link in my previous thread located here in Key Bindings Java Tips Weblog

    In this link the KeyBinding.java code a feature is present on changing the Look and Feel of the application. How is this possible? In addition, is it possible to have the frame movable with a different Look and Feel Layout example if I am to use the Nimbus layout?
    Every project, package, class, method, variable, syntax, algorithm, etc.
    are registered in my memory bank. Thanks to this thread.

  2. #2
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Posts
    1,226
    Rep Power
    6

    Default

    How is this possible?
    Look at the source code to see how its done. You've been given a working example to look at.

    I also gave you the link to the Swing tutorial for a reason. If you look at the table of contents you will see a section on changing the LAF.

    Use the resources you've been given. You learn by trying, not by having use give you the code.

  3. #3
    chyrl is offline Senior Member
    Join Date
    Mar 2010
    Location
    Manila, Philippines
    Posts
    257
    Rep Power
    5

    Default

    I have partially understood the code given in the link.

    But, when I implement it using this code.
    Java Code:
    try {
                UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
            } catch (Exception ex) {
                System.out.println(ex.getMessage());
            }
    Only that pop-up frame (JOptionPane, JInternalFrame, etc.) only applies this LAF. What I am to do is how will the LAF implement on the JFrame or JWindow which the program will run.
    Every project, package, class, method, variable, syntax, algorithm, etc.
    are registered in my memory bank. Thanks to this thread.

  4. #4
    chyrl is offline Senior Member
    Join Date
    Mar 2010
    Location
    Manila, Philippines
    Posts
    257
    Rep Power
    5

    Default

    I have not noticed that the NimbusLookAndFeel has been running in the code.
    But I am to ask you, is there a way to update the Look and Feel of the JFrame itself? I am pertaining the the borders of the JFrame including the minimize, maximize, and close button.
    Every project, package, class, method, variable, syntax, algorithm, etc.
    are registered in my memory bank. Thanks to this thread.

  5. #5
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Posts
    1,226
    Rep Power
    6

    Default

    If the LAF supports custom decorations then you can use the following before you create the frame:

    Java Code:
    JFrame.setDefaultLookAndFeelDecorated(true);

Similar Threads

  1. change Look and feel in Netbeans 6.8
    By banhbaochay in forum NetBeans
    Replies: 5
    Last Post: 04-12-2010, 06:55 PM
  2. Is it Possible To Change The Layout of my IDE?
    By chronoz1300 in forum NetBeans
    Replies: 4
    Last Post: 12-30-2009, 08:10 AM
  3. Edit layout Layout please help me
    By manhtungtnk28@gmail.com in forum New To Java
    Replies: 4
    Last Post: 11-23-2009, 08:41 AM
  4. About look and feel
    By makpandian in forum AWT / Swing
    Replies: 6
    Last Post: 02-13-2009, 02:55 AM
  5. Look and Feel
    By Stein in forum New To Java
    Replies: 10
    Last Post: 10-03-2008, 04:07 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
  •