Windows Look And Feel in Linux
843810Jan 18 2006 — edited Nov 10 2006Hello,
Can anyone tell me how to get the WindowsLookAndFeel working in Linux. here is my code:
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
Font font = new Font("SansSerif", Font.PLAIN, 11);
UIManager.put("JLabel.font", font);
UIManager.put("JButton.font", font);
UIManager.put("JMenu.font", font);
UIManager.put("JToggleButton.font", font );
UIManager.put("JPanel.font", font);
UIManager.put("Button.font", font);
This code is working fine in Windows. But when I test it in Linux, the font is BOLD in place of PLAIN. And Also when I change the font size to 8 for example, the font does not change in Linux (11 and BOLD).
When I change the look and feel to com.sun.java.swing.plaf.motif.MotifLookAndFeel everything works fine.
Can anyone help me with this?
Thanks in advance