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

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

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

    隨筆 - 119  文章 - 3173  trackbacks - 0
    <2007年1月>
    31123456
    78910111213
    14151617181920
    21222324252627
    28293031123
    45678910

    交友莫獨酒,茅臺西鳳游。
    口干古井貢,心徜洋河流。
    稱多情杜康,趟無量雙溝。
    贊中華巍巍,無此不銷愁。

    常用鏈接

    留言簿(68)

    隨筆分類(136)

    隨筆檔案(122)

    最新隨筆

    搜索

    •  

    積分與排名

    • 積分 - 527094
    • 排名 - 92

    最新評論

    ?1?import?java.awt.Desktop;
    ?2?import?java.awt.event.ActionEvent;
    ?3?import?java.awt.event.ActionListener;
    ?4?import?java.io.File;
    ?5?import?java.io.IOException;
    ?6?import?javax.swing.JButton;
    ?7?import?javax.swing.JFileChooser;
    ?8?import?javax.swing.JFrame;
    ?9?
    10?public?class?TestDesktopOpenFile?{
    11?????private?JFrame?frame;
    12?
    13?????/**
    14??????*?Launch?the?application
    15??????*?
    16??????*?@param?args
    17??????*/
    18?????public?static?void?main(String?args[])?{
    19?????????try?{
    20?????????????TestDesktopOpenFile?window?=?new?TestDesktopOpenFile();
    21?????????????window.frame.setVisible(true);
    22?????????}?catch?(Exception?e)?{
    23?????????????e.printStackTrace();
    24?????????}
    25?????}
    26?
    27?????/**
    28??????*?Create?the?application
    29??????*/
    30?????public?TestDesktopOpenFile()?{
    31?????????initialize();
    32?????}
    33?
    34?????/**
    35??????*?Initialize?the?contents?of?the?frame
    36??????*/
    37?????private?void?initialize()?{
    38?????????frame?=?new?JFrame();
    39?????????frame.getContentPane().setLayout(null);
    40?????????frame.setBounds(100,?100,?225,?86);
    41?????????frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    42?????????final?JButton?openButton?=?new?JButton();
    43?????????openButton.setBounds(53,?10,?106,?31);
    44?????????openButton.addActionListener(new?ActionListener()?{
    45?????????????public?void?actionPerformed(ActionEvent?e)?{
    46?????????????????if?(Desktop.isDesktopSupported())?{
    47?????????????????????Desktop?desktop?=?Desktop.getDesktop();
    48?????????????????????JFileChooser?jfc?=?new?JFileChooser();
    49?????????????????????jfc.showOpenDialog(frame);
    50?????????????????????File?file?=?jfc.getSelectedFile();
    51?????????????????????if?(file?!=?null)?{
    52?????????????????????????try?{
    53?????????????????????????????desktop.open(file);
    54?????????????????????????}?catch?(IOException?e1)?{
    55?????????????????????????????e1.printStackTrace();
    56?????????????????????????}
    57?????????????????????}
    58?????????????????}?else?{
    59?????????????????????System.out.println("不支持desktop");
    60?????????????????}
    61?????????????}
    62?????????});
    63?????????openButton.setText("open");
    64?????????frame.getContentPane().add(openButton);
    65?????}
    66?}
    67?

    唉,界面丑到我不忍心說了。。。。。。。。。
    還是SWT好看一點
    posted on 2007-01-25 15:25 交口稱贊 閱讀(1260) 評論(0)  編輯  收藏 所屬分類: Java6
    主站蜘蛛池模板: 亚洲an天堂an在线观看| 国产精品亚洲一区二区麻豆| 日本免费福利视频| 91青青青国产在观免费影视| 深夜A级毛片视频免费| 亚洲精品国产日韩| 亚洲人成网www| 亚洲一区二区三区自拍公司| 国产精品高清全国免费观看| 男女免费观看在线爽爽爽视频| 少妇性饥渴无码A区免费| 免费观看四虎精品成人| 亚洲AV无码片一区二区三区| 亚洲а∨天堂久久精品9966| 亚洲色偷偷av男人的天堂| 亚洲成AV人片在线观看WWW| 亚洲精品无码专区久久同性男| 国产成人免费a在线视频app| 亚洲欧洲免费无码| 成人在线免费看片| 久久ww精品w免费人成| 久草免费手机视频| 精品国产一区二区三区免费| 亚洲精品偷拍视频免费观看| 无码AV动漫精品一区二区免费| 国产精品亚洲lv粉色| 亚洲精品中文字幕无码A片老| 亚洲一级黄色大片| 亚洲日本乱码卡2卡3卡新区| 亚洲另类视频在线观看| 亚洲国产精品yw在线观看| 亚洲小说区图片区| 亚洲一区二区三区在线观看蜜桃| 亚洲精品在线免费观看| 亚洲黄网在线观看| 亚洲免费网站在线观看| 亚洲五月丁香综合视频| 亚洲午夜理论片在线观看| 亚洲欧美乱色情图片| 色欲aⅴ亚洲情无码AV| 狠狠热精品免费观看|