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 / General / July 2005

Tip: Looking for answers? Try searching our database.

how to detect platform?

Thread view: 
juventuz2000@yahoo.com - 24 Jul 2005 12:37 GMT
What I really want to do is set the look and feel according to
platform, win-lnf for windows, gtk-lnf for linux. I don't have a mac to
try it on, but the same for mac would make sense.

When I use getSystemLookAndFeelClassName() I still get the butt ugly
metal on linux, so I'd like some way to detect which platform I'm on so
I can set the lnf accordingly..

Also, does the gtk lnf work on Windows? I've tried with sun-jdk15 and
sun-jre15, none of which seem to have it.
Andrew Thompson - 24 Jul 2005 12:42 GMT
Sub: Re: how to detect platform?

<http://www.physci.org/pc/property.jsp?prop=os.name>

Signature

Andrew Thompson
physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
Beats A Hard Kick In The Face

R.F. Pels - 24 Jul 2005 12:52 GMT
> metal on linux, so I'd like some way to detect which platform I'm on so
> I can set the lnf accordingly..

Consult the system properties:

       System.out.println(System.getProperty("os.name"));

and work from there. @see UIManager

> Also, does the gtk lnf work on Windows? I've tried with sun-jdk15 and
> sun-jre15, none of which seem to have it.

Probably not.

Signature

Ruurd
.o.
..o
ooo



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.