Results 1 to 11 of 11

Thread: Look and Feel

  1. #1
    Stein is offline Member
    Join Date
    Sep 2008
    Posts
    4
    Rep Power
    0

    Question Look and Feel

    Hi

    I've just finished a project in java and I want to improve its GUI by adding some java 'Look and Feel' themes. The problem is that I can load only a few types.

    I've installed some java upgrades but still I cannot load any new themes. Can someone tell what's the problem or what should I install :) ????

    The method I use for setting the Look and Feel is:

    LookAndFeel lf = UIManager.getLookAndFeel();

    try {
    UIManager.setLookAndFeel("org.jvnet.substance.skin .SubstanceBusinessBlackSteelLookAndFeel");
    } catch (InstantiationException e) {
    System.out.println("The certain look and feel class could not be instantiated");
    } catch (ClassNotFoundException e) {
    System.out.println("The certain look and feel class was not found");
    } catch (UnsupportedLookAndFeelException e) {
    System.out.println("The certain look and feel is not suported");
    } catch (IllegalAccessException e) {
    System.out.println("Ilegal exception");
    }

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

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,300
    Rep Power
    20

    Default

    Java Code:
    "org.jvnet.substance.skin .SubstanceBusinessBlackSteelLookAndFeel"
    What's that space doing after skin and before the dot?

    db

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

  5. #5
    Stein is offline Member
    Join Date
    Sep 2008
    Posts
    4
    Rep Power
    0

    Default

    The space is not the problem.

    The exception I get is a ClassNotFoundException.

    For this example I had to import org.jvnet.substance.skin.SubstanceBusinessBlackSte elLookAndFeel; which is not recognized.

    This happens to any 'Look and Feel' theme I try. It does not import the resources so the certain look and feel is not found.

    I have upgraded to the latest jdk and jre versions and still the problem persists.

    Do I have to install something to make it work?

  6. #6
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,300
    Rep Power
    20

    Default

    You do know that these classes aren't part of the standard set, don't you? and that you have to make the class (or a jar that contains it) available on the CLASSPATH?

    db

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

    Default

    The package you are talking about is not a part of standard JDK. You have to download it and add to class path.

  8. #8
    Stein is offline Member
    Join Date
    Sep 2008
    Posts
    4
    Rep Power
    0

    Default

    :)
    OK and can you tell me exactly how I do this? or can you just give me a link from where I download this these resources?

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

    Default

    Actually I don't know from where to find it, search on Google. From where are you find this example, may be there is a link to download that package.

  10. #10
    Stein is offline Member
    Join Date
    Sep 2008
    Posts
    4
    Rep Power
    0

    Default

    I've spent hours on google and I found a lot of examples but no download link for their resources.
    I'm not interested for this example. I just want a link for any new 'Look and Feel' theme ( not the standard ones ... those are working fine ) .

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

Similar Threads

  1. A Look-and-feel switcher
    By Java Tip in forum javax.swing
    Replies: 0
    Last Post: 06-26-2008, 07:45 PM
  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
  •