im coding a program using windowbuilder in eclipse. I would like to have help with changing the design (Look and feel) from metal to windows. How would i do that? thank you
To programmatically specify a L&F, use the UIManager. setLookAndFeel() method with the fully qualified name of the appropriate subclass of LookAndFeel as its argument.
In Eclipse go to
Window > Preferences > WindowBuilder > Swing > LookAndFeel
and tick
Apply choosen LookAndFeel in main() method.
This way whenever you change the look and feel in WindowBuilder's design view, it will be applied in the code.
the Swing call is:
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch(Exception e) {
System.out.println("Error setting native LAF: " + e);
}
i recall in swt the window trims will change naturally when you cycle through the themes since the widgets are actually native to the os. are you using Swing or SWT?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With