原文:http://publishblog.blogchina.com/blog/tb.b?diaryID=1683604
今天才发现Swing的lookandfeel默认字体可以改变的,郁闷哦。我写界面的时候setFont设置得吐血.
今天仔细看了Swing的lookandfeel源代码,终于发现了其实完全可以比避免的。可是之前一直没有看到相关的文档.....
网络上的资源也不见。郁闷又庆幸啊。
尤其JOptionPane,不能使用是很痛苦的事情。现在也可以了.....
无论如何,共享之吧,这可是从源代码中挖掘出来的.
下面是系统初始化的时候运行的代码:
Font font = new Font("Dialog",Font.PLAIN,12);
UIManager.put("ToolTip.font",font);
UIManager.put("Table.font",font);
UIManager.put("TableHeader.font",font);
UIManager.put("TextField.font",font);
UIManager.put("ComboBox.font",font);
UIManager.put("TextField.font",font);
UIManager.put("PasswordField.font",font);
UIManager.put("TextArea.font",font);
UIManager.put("TextPane.font",font);
UIManager.put("EditorPane.font",font);
UIManager.put("FormattedTextField.font",font);
UIManager.put("Button.font",font);
UIManager.put("CheckBox.font",font);
UIManager.put("RadioButton.font",font);
UIManager.put("ToggleButton.font",font);
UIManager.put("ProgressBar.font",font);
UIManager.put("DesktopIcon.font",font);
UIManager.put("TitledBorder.font",font);
UIManager.put("Label.font",font);
UIManager.put("List.font",font);
UIManager.put("TabbedPane.font",font);
UIManager.put("MenuBar.font",font);
UIManager.put("Menu.font",font);
UIManager.put("MenuItem.font",font);
UIManager.put("PopupMenu.font",font);
UIManager.put("CheckBoxMenuItem.font",font);
UIManager.put("RadioButtonMenuItem.font",font);
UIManager.put("Spinner.font",font);
UIManager.put("Tree.font",font);
UIManager.put("ToolBar.font",font);
UIManager.put("OptionPane.messageFont",font);
UIManager.put("OptionPane.buttonFont",font);
分享到:
相关推荐
swing 的各种look and feel.让你的java桌面程序有个性。 window风格,苹果风格,3d风格等等,
有以下十种风格可以设置: javax.swing.UIManager.setLookAndFeel("com.jtattoo.plaf.smart.SmartLookAndFeel"); javax.swing.UIManager.setLookAndFeel("com.jtattoo.plaf.mcwin.McWinLookAndFeel"); ...
java swing Mac风格的LookAndFeel包,含使用说明和效果图,适合用来美化界面
很好看的皮肤包,导入工程就可以看到。希望能给大家带来方便;
java swing Mac风格的look and feel包,美化程序界面,含有使用说明和效果图,不好意思,这个上传时选错了文件,哈哈,不要下载了,正确的文件查另一个我的上传
java swing 中通过UIManager.setLookAndFeel(new SubstanceBusinessBlackSteelLookAndFeel()); JFrame.setDefaultLookAndFeelDecorated(true); //设置主题 SubstanceLookAndFeel.setCurrentTheme(new ...
swing LOOK&FEEL swing LOOK&FEEL swing LOOK&FEEL swing LOOK&FEEL
java Look and feel的一些例子,改变swing界面
Swing 内建皮肤演示项目,直观演示常用控件在不同皮肤下的绘制效果。
swing-layout-1.0.3swing-layout-1.0.3swing-layout-1.0.3swing-layout-1.0.3swing-layout-1.0.3swing-layout-1.0.3swing-layout-1.0.3swing-layout-1.0.3swing-layout-1.0.3swing-layout-1.0.3swing-layout-1.0.3...
SWING设计所用的LOOK AND FEEL
NULL 博文链接:https://wuhongbo.iteye.com/blog/1876250
使用lookandfeel为界面更换皮肤
Swing样式大全 主题 皮肤包(全56种经典)LookAndFeel 本样式合集共有56种样式,包括使用说明和实例,即装即用 5种经典的Alloy和liquidlnf包 7种另类风格和实例包 20种样式风格包 24种样式合集包
有六种Lookandfeel皮肤,Swing界面更美观
设置Swing的LookAndFeel ——windows风格 笔记
Wrap Look and Feel acts as a decorator for the current Look and Feel. Thus, you can choose any Look and Feel you want and wrap it with Wrap Look and Feel to enable anti-aliasing. Doing so requires a ...
widget Java Swing Application的界面风格库(Look And Feel)
BeautyEye是一款Java Swing跨平台外观(look and feel)实现;得益于Android的GUI基础技术,BeautyEye的实现完全不同于其它外观;BeautyEye是免费的,您可以研究、学习甚至商业用途。
Lipstik的外观旨在成为奇妙的Kde主题引擎Lipstik的Java(tm)Swing副本