MyEclipse Forums
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
ecanvas
Post subject: [NB] Different look and feel  PostPosted: Jul 17, 2006 - 03:53 AM
Registered Member
Registered Member


Joined: Jul 17, 2006
Posts: 6

I'm developing a form in Matisse. When I run the form the look of the form is the Java steel look rather than the look in the preview or development window in myEclipse. Do I have something set incorrectly or is this normal behavior?
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Jul 17, 2006 - 03:27 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23824

Yes you need to set the LNF of your form preferabbly from the main() method of your application before it does anything using the code:
UIManager.setLookAndFeelClassName(UIManager.getSystemLookAndFeel());

or something like that, double check the UIManager.setXXX methods, also you will need to wrap it in a try-catch block.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
ecanvas
Post subject:   PostPosted: Jul 18, 2006 - 02:32 AM
Registered Member
Registered Member


Joined: Jul 17, 2006
Posts: 6

Thanks, The new code in main() to test the MyGUI is:


public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (InstantiationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IllegalAccessException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (UnsupportedLookAndFeelException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
new MyGUI().setVisible(true);
}
});
}
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits