Over ride default look and feel Java
Posted
by Aizaz
on Stack Overflow
See other posts from Stack Overflow
or by Aizaz
Published on 2010-04-14T12:17:22Z
Indexed on
2010/04/14
12:23 UTC
Read the original article
Hit count: 317
I want to over ride java look and feel. I just want to show the buttons differently.
I want all the features of Windows Look and Feel but only buttons differently. I hope you get my point.
Color color = new Color(220, 220, 220, 200);
UIManager.put("OptionPane.background", color);
UIManager.put("Panel.background", color);
UIManager.put("Button.foreground", new Color(255, 255, 255, 255));
List<Object> gradients = new ArrayList<Object>(5);
gradients.add(0.00f);
gradients.add(0.00f);
gradients.add(new Color(0xC1C1C1));
gradients.add(new Color(0xFFFFFF));
gradients.add(new Color(0x5C5D5C));
UIManager.put("Button.gradient", gradients);
UIManager.put("Button.highlight",Color.RED);
UIManager.setLookAndFeel(com.sun.java.swing.plaf.windows.WindowsLookAndFeel);
© Stack Overflow or respective owner