Hello ,
RE: Look & Feel Issue
I am running Java 1.4.2_04 on Windows XP
Question.
Is there a way to set my application to be "Windows Classic" style ?
while the desktop is "Windows XP" theme ?
I want my application to look like a "Windows Classic" application (so
that the application is consistant
with my other application which are written with a C++ Gui library and
which still look "Windows Classic" when the desktop is
running the "Windows XP" theme).
If I set my desktop to be "Windows Classic " theme the application
looks fine , but as the users may not
have there windows set to "Windows Classic" then my application will
still look XP style.
Is there a way to set my application(only) to be "Windows Classic"
style ? while the desktop is "Windows XP" theme ?
Thanks in advance
Steve W.
Andrew Thompson - 25 Jul 2005 11:31 GMT
> Is there a way to set my application to be "Windows Classic" style ?
> while the desktop is "Windows XP" theme ?
If you want classic, use classic, if you are talking about your
users, I suggest not compounding the problem (of your C++ apps
not adopting a new L&F) and let the Java app. take on the *user's*
choice of (damn) PLAF. Including perhaps offering some actual
top-notch PLAF's such as the JGoodies* offerings..
[ * Which I prefer to either Windows Classic *or* XP themes. ]
BTW - Which PLAF do your Unix and Mac users get?

Signature
Andrew Thompson
physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
Too Hot For Radio
IchBin - 25 Jul 2005 11:41 GMT
> Hello ,
> RE: Look & Feel Issue
[quoted text clipped - 21 lines]
> Thanks in advance
> Steve W.
Sure, the Look and Feel class is
"com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel"
Check out http://java.sun.com/docs/books/tutorial/uiswing/misc/plaf.html
for Setting the LAF
To see what LAF's are available on your system try this..
import javax.swing.UIManager;
public class AvailableLaF {
public static void main(String[] args) {
UIManager.LookAndFeelInfo[] installed =
UIManager.getInstalledLookAndFeels();
for (int i = 0; i < installed.length; i++) {
System.out.println(installed[i].getName());
}
System.out.println(
"\nThe current look and feel is "
+ UIManager.getLookAndFeel().getName());
}
}

Signature
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.servebeer.com
__________________________________________________________________________
' If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
dhbayne@ihug.co.nz - 25 Jul 2005 22:46 GMT
> Is there a way to set my application to be "Windows Classic" style ?
> while the desktop is "Windows XP" theme ?
You know, users set the look and feel of their machines for a reason -
they like to control how their user interface looks and feels.
Changing or ignoring user preferences is just plain rude.
Roland Budischin - 21 Sep 2005 14:23 GMT
> Hello ,
> RE: Look & Feel Issue
[quoted text clipped - 20 lines]
> Thanks in advance
> Steve W.
Hi,
i had the same problem,
just try to start your application with vm-argument -Dswing.noxp=true ,
regards, Roland
IchBin - 21 Sep 2005 17:03 GMT
>> Hello ,
>> RE: Look & Feel Issue
[quoted text clipped - 25 lines]
> just try to start your application with vm-argument -Dswing.noxp=true ,
> regards, Roland
On the command line the vm-argument is
-Dswing.defaultlaf=com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel
Or you can programmatically set the WindowsClassicLookAndFeel LAF..
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel");
See http://java.sun.com/docs/books/tutorial/uiswing/misc/plaf.html

Signature
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.servebeer.com
__________________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Roland Budischin - 22 Sep 2005 07:31 GMT
>>> Hello ,
>>> RE: Look & Feel Issue
[quoted text clipped - 32 lines]
>
> UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel");
thats the the more comfortable way,
thanks, Roland
> See http://java.sun.com/docs/books/tutorial/uiswing/misc/plaf.html
IchBin - 22 Sep 2005 23:58 GMT
>>>> Hello ,
>>>> RE: Look & Feel Issue
[quoted text clipped - 37 lines]
>
>> See http://java.sun.com/docs/books/tutorial/uiswing/misc/plaf.html
Hi Roland,
Just wondering what is the comfortable way. The -Dswing.defaultlaf or
the programmatically way to set the LAF.. This being the 'best way',
programmatically, I think this is the better way.

Signature
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.servebeer.com
__________________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Roedy Green - 23 Sep 2005 06:41 GMT
>Just wondering what is the comfortable way. The -Dswing.defaultlaf or
>the programmatically way to set the LAF.. This being the 'best way',
>programmatically, I think this is the better way.
if you do it via new, you find out at compile time if the LAF is not
available.
See http://mindprod.com/jgloss/laf.html

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
Roland Budischin - 23 Sep 2005 06:45 GMT
>>>>> Hello ,
>>>>> RE: Look & Feel Issue
[quoted text clipped - 45 lines]
> programmatically way to set the LAF.. This being the 'best way',
> programmatically, I think this is the better way.
Hi,
dont misunderstand, I agree with you!
Regards, Roland
Roedy Green - 23 Sep 2005 10:57 GMT
>dont misunderstand, I agree with you!
i think he is saying he agrees the best way it to use the programmatic
setting:
// windows classic look and feel
UIManager.setLookAndFeel( new
com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel() );
rather than the -D command line switch.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
Roedy Green - 21 Sep 2005 17:35 GMT
>> Is there a way to set my application(only) to be "Windows Classic"
see
http://mindprod.com/jgloss/laf.html

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.