File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "look and feel" Watch "look and feel" New topic

look and feel

jay kumar

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

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
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.



Download Java GUI Builder, <a href="" target="_blank" rel="nofollow"></a>
I agree. Here's the link:
subject: look and feel
It's not a secret anymore!