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

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

?? layeredpanedemo.java

?? java tutorial.sun公司官方出品。java入門書籍。最新版
?? 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一区二区三区免费野_久草精品视频
亚洲成a人v欧美综合天堂下载| 欧美亚日韩国产aⅴ精品中极品| 老色鬼精品视频在线观看播放| 蜜桃av一区二区| 久久精品99国产精品日本| 狠狠色丁香婷综合久久| aaa国产一区| 欧美性色黄大片| 欧美视频在线一区二区三区| 9191成人精品久久| 日韩欧美不卡在线观看视频| 欧美变态tickling挠脚心| 国产精品久99| 男人的j进女人的j一区| 国产成人在线免费观看| 欧美中文字幕一区| 国产日韩欧美综合在线| 综合激情成人伊人| 欧美a级理论片| av欧美精品.com| 日韩视频一区在线观看| 国产精品久久久久久久岛一牛影视| 美女视频黄久久| 91在线观看免费视频| 欧美一区二区三区婷婷月色| 国产精品二三区| 青青草成人在线观看| av在线这里只有精品| 欧美大胆一级视频| 亚洲丝袜精品丝袜在线| 日本欧美一区二区三区| 波多野结衣欧美| 日韩欧美国产精品一区| 一区二区三区国产精华| 国产成人日日夜夜| 日韩手机在线导航| 亚洲制服丝袜一区| 黄色成人免费在线| 欧美色手机在线观看| 国产精品久久久久天堂| 久久99精品国产麻豆婷婷| 日本高清不卡一区| 国产精品国产三级国产专播品爱网| 视频一区二区三区中文字幕| 91一区二区三区在线播放| 久久精品一区二区三区四区| 日韩av成人高清| 欧美日韩一区三区| 一区二区三区 在线观看视频| 粉嫩av一区二区三区在线播放| 精品久久久网站| 激情小说亚洲一区| 久久蜜臀中文字幕| 高清不卡在线观看| 亚洲欧美另类久久久精品| 97国产一区二区| 一区二区在线观看av| 欧美日韩在线电影| 日本aⅴ免费视频一区二区三区 | 国产精品乱人伦中文| 国产成人av资源| 亚洲人亚洲人成电影网站色| 在线观看中文字幕不卡| 午夜久久久久久| 日韩精品中午字幕| 国产成人免费av在线| 亚洲人精品午夜| 欧美美女直播网站| 极品瑜伽女神91| 亚洲精品日日夜夜| 欧美人与禽zozo性伦| 精久久久久久久久久久| 亚洲欧美综合另类在线卡通| 欧美中文字幕久久| 久久国产尿小便嘘嘘| 亚洲欧美综合在线精品| 欧美三级欧美一级| 国内精品伊人久久久久影院对白| 中文字幕乱码久久午夜不卡 | 中文字幕欧美日韩一区| 色综合久久久久久久| 蜜桃一区二区三区在线观看| 亚洲国产精品ⅴa在线观看| 欧美视频一区二| 国产露脸91国语对白| 一区二区三区四区乱视频| 久久综合九色综合久久久精品综合 | 午夜日韩在线观看| 国产日产亚洲精品系列| 欧美系列一区二区| 成人免费黄色在线| 美女精品一区二区| 一区二区三区久久久| 国产亚洲精品精华液| 欧美日韩三级一区| av在线不卡电影| 激情综合色综合久久| 亚洲一二三四在线| 国产精品三级av在线播放| 欧美www视频| 欧美日韩午夜在线视频| 91麻豆国产福利在线观看| 日本乱码高清不卡字幕| 懂色av一区二区三区免费看| 麻豆传媒一区二区三区| 亚洲成人在线观看视频| 亚洲精品国产视频| 国产视频一区不卡| 久久久精品影视| 26uuu国产电影一区二区| 欧美美女喷水视频| 欧美怡红院视频| 日本精品一级二级| 91丨porny丨首页| 成人福利视频网站| 国产aⅴ综合色| 国产在线不卡视频| 乱一区二区av| 久久精品国产999大香线蕉| 亚洲成人黄色影院| 亚洲一区二区三区免费视频| 亚洲免费在线看| 亚洲人成亚洲人成在线观看图片| 国产日韩精品视频一区| 久久久综合视频| 久久久精品国产免费观看同学| 日韩欧美一区二区三区在线| 日韩三级在线观看| 日韩午夜三级在线| 精品少妇一区二区三区| 欧美一激情一区二区三区| 欧美高清你懂得| 日韩一级片在线观看| 欧美电影免费观看高清完整版在线 | 中文字幕不卡三区| 亚洲欧洲日韩女同| 中文字幕一区二区三区精华液| 国产精品乱码一区二三区小蝌蚪| 国产精品每日更新| ㊣最新国产の精品bt伙计久久| 自拍偷自拍亚洲精品播放| 亚洲精品菠萝久久久久久久| 又紧又大又爽精品一区二区| 一区二区三区中文字幕精品精品 | 成人欧美一区二区三区视频网页| 一区免费观看视频| 亚洲一区二区精品久久av| 日本最新不卡在线| 国产精品一区久久久久| 北岛玲一区二区三区四区| 色婷婷av一区二区| 91精品国产色综合久久不卡蜜臀| 日韩一区二区在线观看视频播放| 精品国产sm最大网站免费看| 中文字幕欧美激情一区| 亚洲午夜一区二区| 另类小说综合欧美亚洲| 成人午夜精品在线| 在线一区二区三区做爰视频网站| 欧美一区午夜精品| 国产人久久人人人人爽| 亚洲激情一二三区| 久久99久久久欧美国产| a亚洲天堂av| 在线不卡一区二区| 国产欧美一区二区精品久导航| 亚洲欧美日韩久久| 激情综合色丁香一区二区| www.欧美日韩| 欧美一区二区久久久| 国产精品免费久久| 亚洲成在线观看| 国产成人精品免费一区二区| 欧美日韩在线三级| 欧美激情综合五月色丁香小说| 亚洲高清免费观看| 成人黄色网址在线观看| 91精品国产综合久久精品麻豆 | 中文字幕电影一区| 免费观看成人鲁鲁鲁鲁鲁视频| 成人av免费在线观看| 精品福利一区二区三区免费视频| 一区二区三区精品在线| 成人激情动漫在线观看| 精品国产制服丝袜高跟| 婷婷激情综合网| 色婷婷精品大在线视频| 国产精品青草久久| 国产揄拍国内精品对白| 3d成人h动漫网站入口| 亚洲综合av网| 91在线观看地址| 国产精品三级av在线播放| 国内精品嫩模私拍在线| 欧美日本一区二区| 亚洲一区在线观看免费观看电影高清| 成人一级视频在线观看| 日韩精品专区在线影院重磅| 亚洲va欧美va人人爽| 色999日韩国产欧美一区二区|