- JFrame.setDefaultLookAndFeelDecorated(true);
Swing外观:
- package org.personal.bean;
- import javax.swing.JFrame;
- import javax.swing.UIManager;
- //测试包
- import org.jvnet.substance.SubstanceLookAndFeel;
- import org.jvnet.substance.theme.SubstanceOrangeTheme;
- public class Start {
- //初始皮肤
- public Start() {
- try {
- UIManager.setLookAndFeel(new SubstanceLookAndFeel());
- }
- catch (Exception ex) {
- ex.printStackTrace();
- }
- SubstanceLookAndFeel.setCurrentTheme(new SubstanceOrangeTheme());
- }
- public static void main(String[] args) {
- new Start();
- new JFrame();
- //new LoginFrame(); // 测试登录界面
- // new MainFrame();
- //new StockPileDAO().initData(); //测试插入数据
- }
- }
以上是Swing外观代码,个人总结希望有用。
【编辑推荐】