How to get Java XP Look and Feel
Asked Answered
S

3

5

I want to give XP Look and Feel to my Java Desktop Appliction, regardless of the platform it will run.

I came to know that since JDK 1.4, Sun Microsystems has officially released a look and feel for XP - com.sun.java.swing.plaf.windows.WindowsLookAndFeel

I am using Java 1.6 but when I didn't find any package named windows in javax.swing.plaf package.

Q1. How can I use the XP Look and Feel?

Q2. Will using this look and feel will appear same on all platforms (mac, solaris, linux)?

Sideshow answered 31/3, 2010 at 17:49 Comment(1)
You will need to "roll-your-own"Flair
S
10

You can't. The XP look and feel, along with several of the other platform-flavoured look-and-feels, depends on native support from the actual platform. It can only be used on XP.

Scotney answered 31/3, 2010 at 17:52 Comment(0)
S
4

Have a look at the JGoodies Library

It provides several Swing Look&Feel Styles that do not look exactly like the Windows Design but come close and sure look better that the typical Swing style.

Smollett answered 31/3, 2010 at 17:56 Comment(0)
N
2

Because of the danger of "look and feel" law suites, the Window PL&F is only available on Windows and it checks the os.name system property to make sure..

It used to run on Linux okay. For XP it needs to look up skin information which wouldn't be present (same as the Gtk PL&F). And you probably shouldn't distribute this sort of thing.

Nedrud answered 31/3, 2010 at 18:25 Comment(2)
Does it also depend on native support as claimed by SamB, or is this simply a case of ducking a lawsuit? I would have thought, being Swing that it didn't depend on the native windowing widgets at all.Intimacy
Actually for XP, and presumably Vista there is (or was) no skin information. It runs (not tried it recently) run 95 and classic PL&F okay.Nedrud

© 2022 - 2024 — McMap. All rights reserved.