Question about Java 1.4.2, Swing, and MSStyle files...

Discussion in 'Windows Desktop Systems' started by JSylvia007, Dec 19, 2003.

  1. JSylvia007

    JSylvia007 OSNN Junior Addict

    Messages:
    37
    I have a question pertaining to Java... I'm new to Swing, and javax, and all that, but i've been programming in java for about a year. I searched the web, but cant seem to find anyone who might have any insight to this problem.

    I'm teaching myself swing, and decided that I would mess around with UIManage, to change the look of my application. Very Simple application, like i said, i'm only using it to learn swing... I can get the MetalLookAndFeel, and MotifLookAndFeel to work, but i can't seem to get the WindowsLookAndFeel to work correctly. You see, I'm using a "hacked" msstyles file. I created the theme using StyleBuilder, and windows accepts it fine, using the uxtheme patch found here on ntfs.org. When i tell my java application to use the WindowsLookAndFeel, it yells, and I get a dialog box that opens up and has the title "java.exe".

    [​IMG]

    Which I find strance since windows uses this file perfectly. So since that seemed to be a problem, I temporarily changed my theme back to the windows Luna default theme. My program worked without a hickup.

    My question is... Why won't it use my MSStyles file if windows will? and where might I go to ask this question to Java Guru's?

    my source code is available if you'd like to see what I did

    ~Jake
     
  2. Geffy

    Geffy Moderator Folding Team

    Messages:
    7,805
    Location:
    United Kingdom
    there might be a way to give the application a uxtheme.dll file which it is supposed to use for its own uses, but I dont really know how you would go about that as the most Java messing I have done is the stuff on my course which currently is all console based.
     
  3. punkandacoke

    punkandacoke eat me

    Messages:
    255
    Location:
    at the end of the rainbow
    I think java doesn't like your skin. Try changing it and see if it works.
     
  4. JSylvia007

    JSylvia007 OSNN Junior Addict

    Messages:
    37
    Ok... well... i've switched over to the other LookAndFeels, like Metal and Motif, and both of those work.. But I'd really like to use the WindowsLookAndFeel. If youd like i can post a link to my Java file, and MSStyles file and anything else you might like to see... The only thing I can think of is that you can add a custom theme file and description for it's features, but i dont know how to do that, if anyone does, it would be appreciated.

    ~Jake
     
  5. punkandacoke

    punkandacoke eat me

    Messages:
    255
    Location:
    at the end of the rainbow
    I mean your windows skin. like your desktop skin. your visual stlye. its may be improperly coded and java may not like it. I say quickly change your vs and see if windowslookandfeel works then. if not, we'll get to the harder stuff.
     
  6. JSylvia007

    JSylvia007 OSNN Junior Addict

    Messages:
    37
    Ohhh.. yea... if i change to the windows default Skin (Luna - Blue), it works without a hitch... :-D

    Some background on my skin, it's just a hacked Luna.msstyles, the only difference is that i changed the colors of the "bmp" files that make the skin.

    ~Jake
     
  7. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    strange problems, but then again it is after all a hacked skin.