wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes look and feel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "look and feel" Watch "look and feel" New topic
Author

look and feel

jay kumar
Greenhorn

Joined: Oct 06, 2004
Posts: 12
hi allll,

i am makin a project usin swings and AWT and i am using WINDOWS XP , but i am havin a problem with the display, all the components , i.e. the checkboxes buttons etc. look like Windows 98 or ne other previous windows version, how should i set it to look like Windows XP components , which are far more beautiful and colourful than the ugly old ones !!!


JAY KUMAR CHANDRAN<br />Sun Certified Java Programmer 1.4.2
Scott Presley
Greenhorn

Joined: Apr 15, 2003
Posts: 25
Make sure you set the look and feel. The code below will set the look and feel to the native LnF. If your app is running on windows, then the components will look like windows components...




you'll have to wrap the above line in a try catch clause... I can remember what exception is actually thrown..

hope that helps
-SP
Pat Hays
Ranch Hand

Joined: Aug 20, 2004
Posts: 138
Hi Jack,

I believe that your code is not wrong.

The cause is what version of JDK your are using. I think the JDK your are using must be lower than 1.4.2. If you use JDK1.4.2, this problem will disappear.

Cheers.

Pat


Download Java GUI Builder, <a href="http://www.mars3000.com" target="_blank" rel="nofollow">http://www.mars3000.com</a>
 
Don't get me started about those stupid light bulbs.
 
subject: look and feel
 
Similar Threads
tomcate installation problem
Look and Feel
Java in XP
text field in stored procedure
Tomcat: help