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

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

?? layeredpanedemo.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 javax.swing.*;import javax.swing.border.*;import javax.accessibility.*;import java.awt.*;import java.awt.event.*;/*  * LayeredPaneDemo.java requires * images/dukeWaveRed.gif.  */public class LayeredPaneDemo extends JPanel                             implements ActionListener,                                        MouseMotionListener {    private String[] layerStrings = { "Yellow (0)", "Magenta (1)",                                      "Cyan (2)",   "Red (3)",                                      "Green (4)" };    private Color[] layerColors = { Color.yellow, Color.magenta,                                    Color.cyan,   Color.red,                                    Color.green };    private JLayeredPane layeredPane;    private JLabel dukeLabel;    private JCheckBox onTop;    private JComboBox layerList;    //Action commands    private static String ON_TOP_COMMAND = "ontop";    private static String LAYER_COMMAND = "layer";    //Adjustments to put Duke's toe at the cursor's tip.    private static final int XFUDGE = 40;    private static final int YFUDGE = 57;    public LayeredPaneDemo()    {        setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS));        //Create and load the duke icon.        final ImageIcon icon = createImageIcon("images/dukeWaveRed.gif");        //Create and set up the layered pane.        layeredPane = new JLayeredPane();        layeredPane.setPreferredSize(new Dimension(300, 310));        layeredPane.setBorder(BorderFactory.createTitledBorder(                                    "Move the Mouse to Move Duke"));        layeredPane.addMouseMotionListener(this);        //This is the origin of the first label added.        Point origin = new Point(10, 20);        //This is the offset for computing the origin for the next label.        int offset = 35;        //Add several overlapping, colored labels to the layered pane        //using absolute positioning/sizing.        for (int i = 0; i < layerStrings.length; i++) {            JLabel label = createColoredLabel(layerStrings[i],                                              layerColors[i], origin);            layeredPane.add(label, new Integer(i));            origin.x += offset;            origin.y += offset;        }        //Create and add the Duke label to the layered pane.        dukeLabel = new JLabel(icon);        if (icon != null) {            dukeLabel.setBounds(15, 225,                                icon.getIconWidth(),                                icon.getIconHeight());        } else {            System.err.println("Duke icon not found; using black square instead.");            dukeLabel.setBounds(15, 225, 30, 30);            dukeLabel.setOpaque(true);            dukeLabel.setBackground(Color.BLACK);        }        layeredPane.add(dukeLabel, new Integer(2), 0);        //Add control pane and layered pane to this JPanel.        add(Box.createRigidArea(new Dimension(0, 10)));        add(createControlPanel());        add(Box.createRigidArea(new Dimension(0, 10)));        add(layeredPane);    }    /** Returns an ImageIcon, or null if the path was invalid. */    protected static ImageIcon createImageIcon(String path) {        java.net.URL imgURL = LayeredPaneDemo.class.getResource(path);        if (imgURL != null) {            return new ImageIcon(imgURL);        } else {            System.err.println("Couldn't find file: " + path);            return null;        }    }    //Create and set up a colored label.    private JLabel createColoredLabel(String text,                                      Color color,                                      Point origin) {        JLabel label = new JLabel(text);        label.setVerticalAlignment(JLabel.TOP);        label.setHorizontalAlignment(JLabel.CENTER);        label.setOpaque(true);        label.setBackground(color);        label.setForeground(Color.black);        label.setBorder(BorderFactory.createLineBorder(Color.black));        label.setBounds(origin.x, origin.y, 140, 140);        return label;    }    //Create the control pane for the top of the frame.    private JPanel createControlPanel() {        onTop = new JCheckBox("Top Position in Layer");        onTop.setSelected(true);        onTop.setActionCommand(ON_TOP_COMMAND);        onTop.addActionListener(this);        layerList = new JComboBox(layerStrings);        layerList.setSelectedIndex(2);    //cyan layer        layerList.setActionCommand(LAYER_COMMAND);        layerList.addActionListener(this);        JPanel controls = new JPanel();        controls.add(layerList);        controls.add(onTop);        controls.setBorder(BorderFactory.createTitledBorder(                                 "Choose Duke's Layer and Position"));        return controls;    }    //Make Duke follow the cursor.    public void mouseMoved(MouseEvent e) {        dukeLabel.setLocation(e.getX()-XFUDGE, e.getY()-YFUDGE);    }    public void mouseDragged(MouseEvent e) {} //do nothing    //Handle user interaction with the check box and combo box.    public void actionPerformed(ActionEvent e) {        String cmd = e.getActionCommand();        if (ON_TOP_COMMAND.equals(cmd)) {            if (onTop.isSelected())                layeredPane.moveToFront(dukeLabel);            else                layeredPane.moveToBack(dukeLabel);        } else if (LAYER_COMMAND.equals(cmd)) {            int position = onTop.isSelected() ? 0 : 1;            layeredPane.setLayer(dukeLabel,                                 layerList.getSelectedIndex(),                                 position);        }    }    /**     * Create the GUI and show it.  For thread safety,     * this method should be invoked from the     * event-dispatching thread.     */    private static void createAndShowGUI() {        //Create and set up the window.        JFrame frame = new JFrame("LayeredPaneDemo");        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);        //Create and set up the content pane.        JComponent newContentPane = new LayeredPaneDemo();        newContentPane.setOpaque(true); //content panes must be opaque        frame.setContentPane(newContentPane);        //Display the window.        frame.pack();        frame.setVisible(true);    }    public static void main(String[] args) {        //Schedule a job for the event-dispatching thread:        //creating and showing this application's GUI.        javax.swing.SwingUtilities.invokeLater(new Runnable() {            public void run() {                createAndShowGUI();            }        });    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美国产精品一区| 欧美成人伊人久久综合网| 日本伊人色综合网| 亚洲成人免费看| 亚洲成人激情自拍| 亚洲大片精品永久免费| 亚洲视频小说图片| 亚洲狠狠丁香婷婷综合久久久| 国产性天天综合网| 欧美激情一区二区在线| 中文字幕精品综合| 中文字幕一区av| 亚洲影院免费观看| 午夜影院在线观看欧美| 男人的天堂亚洲一区| 美女久久久精品| 久久国产精品区| 国产.欧美.日韩| 成人aa视频在线观看| 色综合中文字幕国产 | 亚洲综合网站在线观看| 亚洲成人黄色影院| 青青草原综合久久大伊人精品| 日本欧美大码aⅴ在线播放| 久久精品久久久精品美女| 国内外成人在线视频| 成人做爰69片免费看网站| 日本二三区不卡| 91精品国产欧美一区二区成人 | 国产成人免费视频网站高清观看视频 | 精品处破学生在线二十三| 久久久久久电影| 亚洲欧洲综合另类| 日韩精品一级二级| 国产98色在线|日韩| 欧美在线看片a免费观看| 欧美一区二区三区喷汁尤物| 国产精品视频yy9299一区| 亚洲一区二区三区四区的| 久久av中文字幕片| 色偷偷久久一区二区三区| 日韩欧美视频一区| 亚洲色欲色欲www在线观看| 日韩激情视频在线观看| av一二三不卡影片| 日韩欧美国产综合| 一区二区久久久久久| 国产成人精品www牛牛影视| 欧美日韩一区成人| 国产精品美女久久久久av爽李琼 | 国产一区二区精品久久| 91久久人澡人人添人人爽欧美| 欧美mv日韩mv亚洲| 香蕉成人伊视频在线观看| 99久久精品免费看| 日本一区二区免费在线观看视频 | 亚洲国产精品自拍| 成人av电影在线| 日韩欧美专区在线| 亚洲妇熟xx妇色黄| 91国模大尺度私拍在线视频| 国产日韩高清在线| 国内精品视频一区二区三区八戒| 555www色欧美视频| 亚洲一区免费观看| 91精品办公室少妇高潮对白| 国产精品久久久久天堂| 国产精品99久久久| 久久蜜桃香蕉精品一区二区三区| 日韩精品一卡二卡三卡四卡无卡 | 日本成人在线看| 在线观看91av| 三级成人在线视频| 欧美日韩免费观看一区二区三区| 夜夜嗨av一区二区三区中文字幕 | 亚洲少妇30p| 成人精品视频一区二区三区| 欧美激情一区在线| 成人高清免费观看| 中文字幕一区二区在线播放| 成人的网站免费观看| 国产女人aaa级久久久级| 成人午夜大片免费观看| 日本一区二区三区dvd视频在线| 国产精品亚洲专一区二区三区 | 中文字幕在线不卡国产视频| 91在线观看高清| 亚洲精品欧美专区| 91久久精品午夜一区二区| 一个色妞综合视频在线观看| 欧美最猛黑人xxxxx猛交| 亚洲午夜免费视频| 欧美一区二区三区视频在线观看| 久久国产尿小便嘘嘘尿| 国产精品婷婷午夜在线观看| 99热99精品| 亚洲成av人片在线| 欧美zozozo| 成人黄色电影在线| 亚洲一区在线看| 精品国产乱码久久久久久闺蜜| 国产成人综合自拍| 亚洲精品久久7777| 日韩天堂在线观看| 成人中文字幕电影| 亚洲影院免费观看| 久久青草欧美一区二区三区| 99久久久精品| 欧美96一区二区免费视频| 中文字幕的久久| 欧美妇女性影城| 国产盗摄一区二区三区| 亚洲精品美腿丝袜| 欧美精品一区视频| 色网站国产精品| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 午夜视频久久久久久| 欧美精品在线一区二区三区| 国产精品18久久久久| 一区二区三区.www| 国产亚洲欧洲997久久综合| 欧美在线视频你懂得| 国产成人在线观看免费网站| 午夜成人免费视频| 中文字幕一区二区三区不卡在线| 欧美一区二区成人| 色猫猫国产区一区二在线视频| 麻豆成人综合网| 亚洲黄色性网站| 欧美韩日一区二区三区| 精品嫩草影院久久| 欧美日韩在线观看一区二区| 成人深夜视频在线观看| 奇米色一区二区| 婷婷丁香久久五月婷婷| 亚洲免费观看在线观看| 337p粉嫩大胆色噜噜噜噜亚洲| 欧美日韩久久久久久| 一本久道中文字幕精品亚洲嫩| 国产精品一二三区在线| 国产在线精品一区二区夜色| 视频在线观看一区| 丰满放荡岳乱妇91ww| 中文字幕一区av| 99久久免费国产| 日韩一区二区免费在线电影| 91精品黄色片免费大全| 成人丝袜视频网| 国产精品中文字幕欧美| 久久综合综合久久综合| 麻豆精品在线播放| 亚洲国产美女搞黄色| 亚洲一区二区三区四区在线免费观看| 国产精品久久久久久久久久久免费看| 国产亚洲综合在线| 久久精品视频网| 国产精品视频第一区| 国产精品视频你懂的| 亚洲欧美日韩国产另类专区| 1024成人网| 一区二区三区四区亚洲| 亚洲国产欧美在线| 日韩成人一区二区三区在线观看| 欧美96一区二区免费视频| 久久精品国产精品青草| 国产成人综合精品三级| 成人一区二区三区中文字幕| 91丨九色porny丨蝌蚪| 色婷婷精品大在线视频| 欧美美女喷水视频| 日韩欧美一区二区在线视频| 欧美一级夜夜爽| 国产午夜精品理论片a级大结局 | 加勒比av一区二区| 国产精品一区在线观看你懂的| 国产精品99久| 91视频com| 777xxx欧美| 久久色在线视频| 成人欧美一区二区三区在线播放| 亚洲最色的网站| 青草av.久久免费一区| 国产精品456露脸| 欧洲一区二区三区免费视频| 6080亚洲精品一区二区| 久久亚洲综合色| 一区二区三区影院| 老司机精品视频线观看86| 9i在线看片成人免费| 欧美日韩和欧美的一区二区| 久久久久久久久久久电影| 一区二区三区在线视频观看| 久久99精品国产麻豆不卡| 91丨porny丨国产| 日韩免费一区二区| 亚洲欧洲99久久| 国内外精品视频| 9191成人精品久久| 亚洲欧美在线观看| 韩国三级电影一区二区|