aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes NX - UIManager look and feel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "NX - UIManager look and feel "scope"?" Watch "NX - UIManager look and feel "scope"?" New topic
Author

NX - UIManager look and feel "scope"?

BillLeighton
Greenhorn

Joined: Mar 20, 2000
Posts: 20
If I do a UIManager.setLookAndFeel(...) at the start of my application, do I need to check if my LookAndFeel is what I expect in other GUI classes, or can I rest easy that for the life of the app running, the LookAndFeel I initially set will be there?
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11279
    
  59

Hi Bill,
I think the question is: what are you setting the look and feel to? If you are setting it to Windows or to Macintosh L&F, then there is no guarantee that your examiner will have such a platform (and those L&Fs cannot be distributed), and so what they see may be totally different to what you planned.
My recommendation would be not to set the look and feel at all. You might want to set it yourself just for testing purposes, but do most of your design work with the default L&F. That way it should look the same on all platforms.
Regards, Andrew


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
BillLeighton
Greenhorn

Joined: Mar 20, 2000
Posts: 20
Ah.... I was under the impression that it was safest to set the Look and Feel to "Metal" to guarantee it would look and feel the same cross-platform...
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11279
    
  59

Hi Bill,
OK, I understand what you are trying to do now.
To answer your original question - I believe that once you have succesfully set the look and feel, then it should remain in effect for the remainder of your applications life.
Personally I didn't set the look and feel. That way the user could use a different look and feel if they really wanted to, but by default it would be the Java Look and Feel.
Regards, Andrew
Jack Conway
Ranch Hand

Joined: Aug 10, 2003
Posts: 30
Would it be acceptable to set the look and feel to the classname returned by UIManager.getSystemLookAndFeelClassName() ? That would set to the correct native look and feel (if there is one), and if it fails no harm is done.
(I say this because personally I cannot stand Metal and I think their windows look and feel is pretty accurate)


Co-author, <a href="http://www.ariadnetraining.co.uk/books.htm" target="_blank" rel="nofollow">Java Programming and Enterprise Java</a> (free download)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NX - UIManager look and feel "scope"?
 
Similar Threads
About LookAndFeel
Different dimesions between LookAndFeel's
is it impossible?
Changing LookAndFeel
cant i change LAF at runtime?