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

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

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

    何以解憂?唯有Java

    其實程序員也懂得浪漫!
    posts - 90, comments - 637, trackbacks - 0, articles - 2
      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

    JXTaskPane 示例

    Posted on 2009-11-27 17:47 guanminglin@gmail.com 閱讀(27464) 評論(1)  編輯  收藏 所屬分類: JavaSENetBeans
    JXTaskPane 類似XP 左邊的導航欄,在開發Swing應用的時候很好用的。

    下面兩張截圖反應了JXTaskPane的動畫效果。可以自由的卷起和展開。

      

    JXTaskPane的的使用步驟:

    1、新建一個 JXTaskPaneContainer

    2、新建{i}個JXTaskPane   (i>=1)

    3、依次將 新建的JXTaskPane 添加到 JXTaskPaneContainer 中去。

    4、最后將 JXTaskPaneContainer 添加到JFrame 中。

    附上 SwingX doc中的示例代碼


     JXFrame frame = new JXFrame();
     
     
    // a container to put all JXTaskPane together
     JXTaskPaneContainer taskPaneContainer = new JXTaskPaneContainer();
     
     
    // create a first taskPane with common actions
     JXTaskPane actionPane = new JXTaskPane();
     actionPane.setTitle(
    "Files and Folders");
     actionPane.setSpecial(
    true);
     
     
    // actions can be added, a hyperlink will be created
     Action renameSelectedFile = createRenameFileAction();
     actionPane.add(renameSelectedFile);
     actionPane.add(createDeleteFileAction());
     
     
    // add this taskPane to the taskPaneContainer
     taskPaneContainer.add(actionPane);
     
     
    // create another taskPane, it will show details of the selected file
     JXTaskPane details = new JXTaskPane();
     details.setTitle(
    "Details");
      
     
    // add standard components to the details taskPane
     JLabel searchLabel = new JLabel("Search:");
     JTextField searchField 
    = new JTextField("");
     details.add(searchLabel);
     details.add(searchField);
     
     taskPaneContainer.add(details);
     
     
    // put the action list on the left 
     frame.add(taskPaneContainer, BorderLayout.EAST);
     
     
    // and a file browser in the middle
     frame.add(fileBrowser, BorderLayout.CENTER);
     
     frame.pack();
     frame.setVisible(
    true);


    默認JXTaskPane 的動畫功能是起用的,你也可以關閉 :

    只要 myJXTaskPane.setAnimated(false);  就可以了。




    評論

    # re: JXTaskPane 示例  回復  更多評論   

    2011-09-29 09:14 by tb
    界面做得不錯啊
    主站蜘蛛池模板: 中文字幕无码免费久久9一区9| 乱爱性全过程免费视频| 久久青草精品38国产免费| 久久亚洲精品无码播放| 久久WWW免费人成—看片| 区久久AAA片69亚洲| 中文字幕久精品免费视频| 亚洲国产精品无码久久一区二区| 中文字幕免费人成乱码中国| 亚洲人成色777777在线观看| 华人在线精品免费观看| 久久狠狠高潮亚洲精品| xxxx日本免费| 久久亚洲中文无码咪咪爱| 亚洲欧洲自拍拍偷精品 美利坚 | 亚洲精品在线视频| 一个人看www免费高清字幕| 久久久久亚洲AV成人网人人软件| 免费在线黄色电影| 亚洲小说区图片区| 国产成人无码a区在线观看视频免费| 日本系列1页亚洲系列| 亚洲乳大丰满中文字幕| 亚洲精品视频免费看| 亚洲一线产品二线产品| 免费观看国产精品| 国产在线观看免费视频软件| 亚洲国产高清在线精品一区| 在线jyzzjyzz免费视频| 国产精品1024在线永久免费 | 亚洲AV男人的天堂在线观看| 国产男女性潮高清免费网站| 中文毛片无遮挡高清免费| 亚洲最大的成网4438| 免费鲁丝片一级在线观看| 成在人线av无码免费高潮水| 91亚洲精品麻豆| 久99精品视频在线观看婷亚洲片国产一区一级在线 | 午夜免费福利在线观看| 国产精品99爱免费视频| 日韩亚洲国产高清免费视频|