Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / September 2005

Tip: Looking for answers? Try searching our database.

L&F Windows XP Classic Look

Thread view: 
Mr Steve - 25 Jul 2005 11:01 GMT
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.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.