Created
November 15, 2012 14:38
-
-
Save mdeverdelhan/4078934 to your computer and use it in GitHub Desktop.
Setting global UI for Swing buttons
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JOptionPane.showConfirmDialog(this, confirmMessage, confirmTitle, JOptionPane.YES_NO_OPTION); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UIManager.put("ButtonUI", DefaultButtonUI.class.getName()); // Here is the relevant line | |
UIManager.put("Panel.background", Color.LIGHT_GRAY); | |
UIManager.put("OptionPane.background", Color.LIGHT_GRAY); | |
UIManager.put("TitledBorder.font", new Font(Font.SANS_SERIF, Font.BOLD, 12)); | |
// See http://tips4java.wordpress.com/2008/10/09/uimanager-defaults/ for more UIManager keys/values |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment