亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? jwsfilechooserdemo.java

?? java tutotrials or beginners
?? JAVA
字號:
/* * Copyright (c) 1995 - 2008 Sun Microsystems, Inc.  All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * *   - Redistributions of source code must retain the above copyright *     notice, this list of conditions and the following disclaimer. * *   - Redistributions in binary form must reproduce the above copyright *     notice, this list of conditions and the following disclaimer in the *     documentation and/or other materials provided with the distribution. * *   - Neither the name of Sun Microsystems nor the names of its *     contributors may be used to endorse or promote products derived *     from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package components;import java.awt.*;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.io.ByteArrayInputStream;import java.io.IOException;import javax.swing.*;import javax.swing.filechooser.*;import javax.swing.SwingUtilities;import javax.jnlp.*;/*  * JWSFileChooserDemo.java must be compiled with jnlp.jar.  For * example, if jnlp.jar is in a subdirectory named jars: *  *   javac -classpath .:jars/jnlp.jar JWSFileChooserDemo.java [UNIX] *   javac -classpath .;jars/jnlp.jar JWSFileChooserDemo.java [Microsoft Windows] * * JWSFileChooserDemo.java requires the following files when executing: *   images/Open16.gif *   images/Save16.gif */public class JWSFileChooserDemo extends JPanel                                implements ActionListener {    static private final String newline = "\n";    JButton openButton, saveButton;    JTextArea log;    public JWSFileChooserDemo() {        super(new BorderLayout());        //Create the log first, because the action listeners        //need to refer to it.        log = new JTextArea(5,20);        log.setMargin(new Insets(5,5,5,5));        log.setEditable(false);        JScrollPane logScrollPane = new JScrollPane(log);        //Create the open button.  We use the image from the JLF        //Graphics Repository (but we extracted it from the jar).        openButton = new JButton("Open a File...",                                  createImageIcon("images/Open16.gif"));        openButton.addActionListener(this);        //Create the save button.  We use the image from the JLF        //Graphics Repository (but we extracted it from the jar).        saveButton = new JButton("Save a File...",                                 createImageIcon("images/Save16.gif"));        saveButton.addActionListener(this);         //For layout purposes, put the buttons in a separate panel        JPanel buttonPanel = new JPanel();        buttonPanel.add(openButton);        buttonPanel.add(saveButton);        //Add the buttons and the log to this panel.        add(buttonPanel, BorderLayout.PAGE_START);        add(logScrollPane, BorderLayout.CENTER);    }    public void actionPerformed(ActionEvent e) {        //Handle open button action.        if (e.getSource() == openButton) {            FileOpenService fos = null;            FileContents fileContents = null;            try {                fos = (FileOpenService)ServiceManager.                          lookup("javax.jnlp.FileOpenService");             } catch (UnavailableServiceException exc) { }            if (fos != null) {                try {                    fileContents = fos.openFileDialog(null, null);                 } catch (Exception exc) {                    log.append("Open command failed: "                               + exc.getLocalizedMessage()                               + newline);                    log.setCaretPosition(log.getDocument().getLength());                }            }            if (fileContents != null) {                try {                    //This is where a real application would do something                    //with the file.                    log.append("Opened file: " + fileContents.getName()                               + "." + newline);                } catch (IOException exc) {                    log.append("Problem opening file: "                               + exc.getLocalizedMessage()                               + newline);                }            } else {                log.append("User canceled open request." + newline);            }            log.setCaretPosition(log.getDocument().getLength());        }        //Handle save button action.        if (e.getSource() == saveButton) {            FileSaveService fss = null;            FileContents fileContents = null;            ByteArrayInputStream is = new ByteArrayInputStream(                    (new String("Saved by JWSFileChooserDemo").getBytes()));                                             //XXX YIKES! If they select an                                             //XXX existing file, this will                                             //XXX overwrite that file.            try {                fss = (FileSaveService)ServiceManager.                          lookup("javax.jnlp.FileSaveService");             } catch (UnavailableServiceException exc) { }            if (fss != null) {                try {                    fileContents = fss.saveFileDialog(null,                                                      null,                                                      is,                                                      "JWSFileChooserDemo.txt");                 } catch (Exception exc) {                    log.append("Save command failed: "                               + exc.getLocalizedMessage()                               + newline);                    log.setCaretPosition(log.getDocument().getLength());                }            }            if (fileContents != null) {                try {                    log.append("Saved file: " + fileContents.getName()                               + "." + newline);                } catch (IOException exc) {                    log.append("Problem saving file: "                               + exc.getLocalizedMessage()                               + newline);                }            } else {                log.append("User canceled save request." + newline);            }            log.setCaretPosition(log.getDocument().getLength());        }    }    /** Returns an ImageIcon, or null if the path was invalid. */    protected static ImageIcon createImageIcon(String path) {        java.net.URL imgURL = JWSFileChooserDemo.class.getResource(path);        if (imgURL != null) {            return new ImageIcon(imgURL);        } else {            System.err.println("Couldn't find file: " + path);            return null;        }    }    /**     * Create the GUI and show it.  For thread safety,     * this method should be invoked from the     * event dispatch thread.     */    private static void createAndShowGUI() {        //Create and set up the window.        JFrame frame = new JFrame("JWSFileChooserDemo");        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);        //Add content to the window.        frame.add(new JWSFileChooserDemo());        //Display the window.        frame.pack();        frame.setVisible(true);    }    public static void main(String[] args) {        //Schedule a job for the event dispatch thread:        //creating and showing this application's GUI.        SwingUtilities.invokeLater(new Runnable() {            public void run() {                //Turn off metal's use of bold fonts                UIManager.put("swing.boldMetal", Boolean.FALSE);                createAndShowGUI();            }        });    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品一区二区三区影院| 欧美日韩大陆一区二区| 欧美在线观看视频一区二区| 综合精品久久久| 成人av网址在线观看| 中文字幕一区二区三区不卡| 91免费国产在线观看| 亚洲一区二区在线免费看| 欧美性色黄大片手机版| 奇米777欧美一区二区| 欧美大片日本大片免费观看| 色综合久久中文字幕| 三级在线观看一区二区| 精品国产一区二区精华| 日韩视频一区二区三区 | 色域天天综合网| 日韩一区二区三区四区五区六区| 国产精品久99| 91精品国产乱码久久蜜臀| 成人成人成人在线视频| 精品免费99久久| 日韩中文字幕不卡| 成人久久视频在线观看| 久久久久高清精品| 麻豆精品在线观看| 日韩一级欧美一级| 男女性色大片免费观看一区二区 | 亚洲在线观看免费| 91尤物视频在线观看| 国产精品成人免费在线| 成人av电影在线播放| 国产精品无码永久免费888| 国产精品一品视频| 国产日韩欧美精品一区| 国产一区二区不卡在线| 久久久99免费| 成人开心网精品视频| 亚洲少妇最新在线视频| 色婷婷av一区二区三区gif | 欧美午夜精品久久久久久超碰| 最新国产の精品合集bt伙计| 成人高清伦理免费影院在线观看| 国产亚洲福利社区一区| 成人免费高清在线| 一区二区在线看| 欧美老女人在线| 久久99精品久久久久久动态图 | 亚洲欧洲综合另类在线| 一本色道亚洲精品aⅴ| 亚洲国产精品久久久男人的天堂| 欧美日韩一区高清| 免播放器亚洲一区| 亚洲视频一区二区在线观看| 91在线视频播放地址| 一片黄亚洲嫩模| 日韩一级黄色大片| 国产成人8x视频一区二区| 最新欧美精品一区二区三区| 欧日韩精品视频| 久久精品999| 亚洲欧洲美洲综合色网| 欧美另类z0zxhd电影| 国产在线精品不卡| 洋洋av久久久久久久一区| 日韩一区二区三区在线| 99久久er热在这里只有精品66| 午夜天堂影视香蕉久久| 国产三区在线成人av| 欧美日韩精品一区二区天天拍小说| 久久99国产精品久久99果冻传媒| 国产精品久久久久影院老司| 91精品国产综合久久婷婷香蕉| 大胆亚洲人体视频| 日本午夜一本久久久综合| 国产精品欧美经典| 日韩免费观看高清完整版| 91精彩视频在线| 丁香婷婷深情五月亚洲| 婷婷成人激情在线网| 中文字幕一区二| 欧美精品一区二区三| 欧美色综合天天久久综合精品| 久久99精品国产91久久来源| 亚洲高清视频在线| 国产精品麻豆欧美日韩ww| 日韩三级视频在线观看| 在线精品视频小说1| 欧美顶级少妇做爰| 91网站在线播放| 国产91清纯白嫩初高中在线观看| 婷婷久久综合九色综合绿巨人| 中文字幕日本不卡| 国产欧美日韩精品a在线观看| 欧美在线你懂得| 99麻豆久久久国产精品免费| 国产精品一区二区久久精品爱涩| 午夜精品免费在线| 亚洲制服丝袜av| 亚洲黄色片在线观看| 中文字幕成人在线观看| 久久久三级国产网站| 欧美一区二区播放| 6080亚洲精品一区二区| 欧美午夜在线观看| 欧美亚洲图片小说| 欧洲生活片亚洲生活在线观看| 97se亚洲国产综合自在线| 成人高清免费在线播放| 成人av网站在线观看| 国产精品中文欧美| 国产精品资源站在线| 国产综合色视频| 国产精品一区二区黑丝| 狠狠色丁香久久婷婷综合丁香| 久久99精品久久久久久久久久久久| 三级欧美韩日大片在线看| 无吗不卡中文字幕| 久久国产精品72免费观看| 免费看黄色91| 久久99日本精品| 国产乱对白刺激视频不卡| 国产综合色在线| 国产不卡视频一区| av不卡在线观看| 欧美三区在线观看| 在线观看91av| 久久久综合视频| 国产精品久久久久久久第一福利| 亚洲视频在线一区观看| 亚洲国产成人tv| 毛片av中文字幕一区二区| 麻豆国产一区二区| 粉嫩一区二区三区性色av| 9久草视频在线视频精品| 色又黄又爽网站www久久| 欧美日韩性生活| 精品国产一区二区三区av性色 | 制服丝袜成人动漫| 一区二区三区在线视频免费观看| 一区二区在线观看不卡| 日韩综合一区二区| 国产精品一区一区| 色综合久久综合| 精品少妇一区二区三区在线视频| 国产欧美日韩亚州综合| 亚洲夂夂婷婷色拍ww47| 久久精品国产精品青草| 国产98色在线|日韩| 欧美三区免费完整视频在线观看| 日韩欧美一级在线播放| 国产精品亲子伦对白| 五月天网站亚洲| 国产精品911| 6080yy午夜一二三区久久| 国产蜜臀av在线一区二区三区| 亚洲色图视频网| 久久99久久99| 91福利国产精品| 久久精品一区二区三区av| 亚洲大片免费看| av激情亚洲男人天堂| 欧美本精品男人aⅴ天堂| 一区二区三区四区国产精品| 国产精品一二三区在线| 欧美日韩中字一区| 日韩毛片视频在线看| 国产综合色产在线精品| 欧美日韩视频在线一区二区| 中文欧美字幕免费| 看国产成人h片视频| 欧美视频一区二区三区| 日韩一区在线免费观看| 国产精品一品视频| 欧美电影免费观看高清完整版在 | 国内精品国产成人国产三级粉色| 在线看一区二区| 国产精品久久久久久久午夜片| 蜜臀91精品一区二区三区| 欧美亚洲综合一区| 亚洲卡通动漫在线| 9人人澡人人爽人人精品| 国产日韩欧美激情| 久久9热精品视频| 欧美精品亚洲二区| 亚洲成人午夜影院| 91福利在线观看| 一二三区精品视频| 欧美成人精品3d动漫h| 五月天视频一区| 欧美日韩一二三区| 午夜久久久久久| 欧美日韩一级片网站| 亚洲国产精品久久不卡毛片 | 欧美日韩免费不卡视频一区二区三区| 国产精品嫩草影院av蜜臀| 大陆成人av片| 中文字幕日本乱码精品影院| 99久久免费国产| 综合色天天鬼久久鬼色| 91免费观看国产|