Results 1 to 7 of 7
  1. #1
    makpandian's Avatar
    makpandian is offline Senior Member
    Join Date
    Dec 2008
    Location
    Chennai
    Posts
    439
    Rep Power
    6

    Default About look and feel

    Hi
    i have done java swing project.
    Now My project is in java look and feel.
    i want to chage my project into windows look and feel.
    i am using Netbeans 6.5.

    If anybody know about it,please send your sugges.
    Mak
    (Living @ Virtual World)

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,188
    Rep Power
    19

  3. #3
    ramesh.8189 is offline Member
    Join Date
    Feb 2009
    Location
    India
    Posts
    23
    Rep Power
    0

    Default

    HAVE YOU TRIED USING setSystemLookandFeel() function..

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,188
    Rep Power
    19

    Default

    Quote Originally Posted by ramesh.8189 View Post
    HAVE YOU TRIED USING setSystemLookandFeel() function..
    In the first place Java has methods, not functions.

    And perhaps you would like to enlighten us which standard class in the JDK has a method setSystemLookAndFeel(). I couldn't find it in the API.
    S-Index (Java Platform SE 6)

    db

  5. #5
    makpandian's Avatar
    makpandian is offline Senior Member
    Join Date
    Dec 2008
    Location
    Chennai
    Posts
    439
    Rep Power
    6

    Default

    Thanks for your contribution in this thread
    Mak
    (Living @ Virtual World)

  6. #6
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Posts
    1,046
    Rep Power
    7

    Default

    This is very simple; however, make sure you do it *first thing*, before any other Swing code.

    UIManager.setLookAndFeel(new WindowsLookAndFeel());

    Note that you can *only* use this LAF on a Windows machine. Check out the Sun Tutorial.

    A *very* recent change (1.6.10) change the default LAF from Metal ("Java") to the OS specific (WindowsLookAndFeel, for Windows) one.

    Also, the latest Metal LAF, with the default "Ocean" theme, looks very nice, and it is cross-platform.
    Last edited by Steve11235; 02-12-2009 at 05:12 PM. Reason: oops...

  7. #7
    MK12's Avatar
    MK12 is offline Senior Member
    Join Date
    Jan 2009
    Posts
    185
    Rep Power
    6

    Default

    Java Code:
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    That makes the L&F the computer-that-is-running-the-GUI's L&F. If you are on windows, will set to windows, etc. Put in top level container's main method, before you run the toplevel container.
    Tell me if you want a cool Java logo avatar like mine and I'll make you one.

Similar Threads

  1. Look and Feel
    By Stein in forum New To Java
    Replies: 10
    Last Post: 10-03-2008, 04:07 AM
  2. Swing - Look and feel
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 03-11-2008, 10:53 PM
  3. Look and Feel
    By arun_kumar in forum AWT / Swing
    Replies: 1
    Last Post: 11-17-2007, 06:21 PM
  4. look and feel plugin
    By gabriel in forum New To Java
    Replies: 2
    Last Post: 08-06-2007, 08:44 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
  •