<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    一切皆可抽象

    大而無形 庖丁解牛 厚積薄發(fā) 滌慮玄覽
       ::  ::  ::  ::  :: 管理

    最近在做Java Application的項(xiàng)目,對于ui的美觀,做了一些嘗試。有幸看到了JGoodIdes的LookAndFeel包。
    效果大家可以看看如下連接
            http://www.jgoodies.com
    經(jīng)過試驗(yàn),解決了中文亂碼問題,下面將經(jīng)驗(yàn)和大家共分享。
    LookAndFeel如同css一樣,具體的概念大家可以參考其他文章,這里不做贅述。

    http://www.tkk7.com/Files/itaogo/plastic-1.1.3.zip
    1,加載附件plastic-1.1.3.jar到lib path,我用的是jbuilderX
    2,創(chuàng)建一個(gè)新類AppFont.java
       import java.awt.*;
       import javax.swing.UIManager;
       public class AppFont()
       {
         public static void setFont(Font pFont){
          UIManager.put("Button.font", pFont);
          UIManager.put("ToggleButton.font", pFont);
          UIManager.put("RadioButton.font", pFont);
          UIManager.put("CheckBox.font", pFont);
          UIManager.put("ColorChooser.font", pFont);
          UIManager.put("ToggleButton.font", pFont);
          UIManager.put("ComboBox.font", pFont);
          UIManager.put("ComboBoxItem.font", pFont);
          UIManager.put("InternalFrame.titleFont", pFont);
          UIManager.put("Label.font", pFont);
          UIManager.put("List.font", pFont);
        UIManager.put("MenuBar.font", pFont);
        UIManager.put("Menu.font", pFont);
        UIManager.put("MenuItem.font", pFont);
        UIManager.put("RadioButtonMenuItem.font", pFont);
        UIManager.put("CheckBoxMenuItem.font", pFont);
        UIManager.put("PopupMenu.font", pFont);
        UIManager.put("OptionPane.font", pFont);
        UIManager.put("Panel.font", pFont);
        UIManager.put("ProgressBar.font", pFont);
        UIManager.put("ScrollPane.font", pFont);
        UIManager.put("Viewport", pFont);
        UIManager.put("TabbedPane.font", pFont);
        UIManager.put("TableHeader.font", pFont);
        UIManager.put("Table.font", pFont);
        UIManager.put("TextField.font", pFont);
        UIManager.put("PasswordFiled.font", pFont);
        UIManager.put("TextArea.font", pFont);
        UIManager.put("TextPane.font", pFont);
        UIManager.put("EditorPane.font", pFont);
        UIManager.put("TitledBorder.font", pFont);
        UIManager.put("ToolBar.font", pFont);
        UIManager.put("ToolTip.font", pFont);
        UIManager.put("Tree.font", pFont);
          }
       }
    3,尋找您的java application 的主程序 
     
      //引入
      import com.jgoodies.plaf.LookUtils;
      import com.jgoodies.plaf.plastic.PlasticLookAndFeel;
     
      //修改程序如下
      //Main method
       public static void main(String[] args) {
        try {
          //原來的,請注釋掉;jbuilder是如此寫法。
          UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
          //修改為
          UIManager.put("ClassLoader", LookUtils.class.getClassLoader());
          UIManager.setLookAndFeel(new PlasticLookAndFeel());
          AppFont.setFont(new java.awt.Font("宋體", 0, 12));
        }
        catch(Exception e) {
          e.printStackTrace();
        }
        new MainApp();
      }
     
     4,附件2 UISample.rar是jbuilder的一個(gè)簡單效果的項(xiàng)目。下載地址 http://www.tkk7.com/Files/itaogo/UISample.rar

    主站蜘蛛池模板: 7723日本高清完整版免费| 国产无遮挡又黄又爽免费网站| 未满十八18禁止免费无码网站| 亚洲精品综合久久| 午夜免费福利在线| 好吊妞788免费视频播放| 免费永久看黄在线观看app| 亚洲精品无码中文久久字幕| 在线看片人成视频免费无遮挡| 亚洲国产视频久久| 国内自产拍自a免费毛片| 久久人午夜亚洲精品无码区| 免费在线观看的黄色网址| 一级一看免费完整版毛片| 亚洲视频在线免费看| 亚洲国产成人久久77| 精品久久久久久国产免费了| 免费特级黄毛片在线成人观看| 亚洲成AV人片高潮喷水| 四虎永久免费影院在线| 国产成人高清精品免费观看| 亚洲AV无码一区东京热久久 | 成人A毛片免费观看网站| 国产AV无码专区亚洲AV毛网站| 99久久99热精品免费观看国产| 亚洲av无码不卡久久| 国产禁女女网站免费看| 亚洲欧洲国产综合| 免费人成黄页在线观看日本| 亚洲欧洲在线播放| 亚洲av无码国产精品色在线看不卡| 99精品视频免费| 亚洲日韩精品无码专区网站| 国产成人免费AV在线播放 | 国产视频精品免费视频| 亚洲精品白色在线发布| 国产成人免费高清在线观看| 国产亚洲免费的视频看| 亚洲综合一区国产精品| 久久91亚洲人成电影网站| 一个人免费观看www视频在线|