I want to run my application in different platform and i want to use different look and feel for each platform. could you please guide how can approach this?
This is what i did. in main java class i added static block and by adding below condition.
if(System.getProperty("os.name").startsWith("Windows")) //Added for linux
{
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
}
else
{
UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
}
When I run my application in linux platform, it is not showing metal look and feel rather it's showing java default look and feel mainly in JOptionPane
.