views:

434

answers:

3

Hopefully no one has asked this question - didn't see it, but I apologize if it's a duplicate.

Anyway, I'm building some plug-ins with Eclipse RCP and am using SWT for my UI. I have a Composite that contains some panels and other items - anyway, I've noticed a bit of a difference in the appearance of the UI depending on how my OS is set up.

I'm running windows XP but am using the "classic" look/feel which is that of Windows 98. When it's like this - the UI looks fine; however, when I switch to the newer XP look/feel with that tacky blue bar and what not - labels and borders in my composite are different.

Is there a way I can force SWT to use the classic look/feel?

+2  A: 

I think it is a design decision of SWT to make it inherit the platform look and feel. I imagine this is partly to address the usual "java apps look rubbish/out of place/different" comments and partly to make it easier to load the relevant fragments at startup. I don't know of any way to override the standard values.

Rich Seller
+3  A: 

You need a javaw.exe.manifest bound to your application.

Here is an article that describes the problem:

http://www.javalobby.org/forums/thread.jspa?threadID=15414&tstart=0

Dani Cricco
I don't know anything about this manifest, but note that starting in Eclipse 3.4, the eclipse.exe launcher will start the vm by loading the jvm.dll in-process and using the JNI Invocation API. This means that you may want an eclipse.exe.manifest beside the eclipse launcher, rather than a javaw.exe.manifest.
Andrew Niefer
+1  A: 

Does them being different somehow interfere with the operation of the application? SWT is designed to inherit your user's preference for UI presentation. This is basic HCI - let your user decide what is tacky.

Robert Wilson