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

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

?? containereventdemo.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 events;/* * ContainerEventDemo.java requires no other files. */import javax.swing.*;import java.awt.Dimension;import java.awt.GridLayout;import java.awt.GridBagLayout;import java.awt.GridBagConstraints;import java.awt.event.ContainerEvent;import java.awt.event.ContainerListener;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.util.Vector;public class ContainerEventDemo extends JPanel                                 implements ContainerListener,                                           ActionListener {    JTextArea display;    JPanel buttonPanel;    JButton addButton, removeButton, clearButton;    Vector<JButton> buttonList;    static final String ADD = "add";    static final String REMOVE = "remove";    static final String CLEAR = "clear";    static final String newline = "\n";    public ContainerEventDemo() {        super(new GridBagLayout());        GridBagLayout gridbag = (GridBagLayout)getLayout();        GridBagConstraints c = new GridBagConstraints();        //Initialize an empty list of buttons.        buttonList = new Vector<JButton>(10, 10);        //Create all the components.        addButton = new JButton("Add a button");        addButton.setActionCommand(ADD);        addButton.addActionListener(this);        removeButton = new JButton("Remove a button");        removeButton.setActionCommand(REMOVE);        removeButton.addActionListener(this);        buttonPanel = new JPanel(new GridLayout(1,1));        buttonPanel.setPreferredSize(new Dimension(200, 75));        buttonPanel.addContainerListener(this);        display = new JTextArea();        display.setEditable(false);        JScrollPane scrollPane = new JScrollPane(display);        scrollPane.setPreferredSize(new Dimension(200, 75));        clearButton = new JButton("Clear text area");        clearButton.setActionCommand(CLEAR);        clearButton.addActionListener(this);        c.fill = GridBagConstraints.BOTH; //Fill entire cell.        c.weighty = 1.0;  //Button area and message area have equal height.        c.gridwidth = GridBagConstraints.REMAINDER; //end of row        gridbag.setConstraints(scrollPane, c);        add(scrollPane);        c.weighty = 0.0;          gridbag.setConstraints(clearButton, c);        add(clearButton);        c.weightx = 1.0;  //Add/remove buttons have equal width.        c.gridwidth = 1;  //NOT end of row        gridbag.setConstraints(addButton, c);        add(addButton);        c.gridwidth = GridBagConstraints.REMAINDER; //end of row        gridbag.setConstraints(removeButton, c);        add(removeButton);        c.weighty = 1.0;  //Button area and message area have equal height.        gridbag.setConstraints(buttonPanel, c);        add(buttonPanel);        setPreferredSize(new Dimension(400, 400));        setBorder(BorderFactory.createEmptyBorder(20,20,20,20));    }    public void componentAdded(ContainerEvent e) {        displayMessage(" added to ", e);    }    public void componentRemoved(ContainerEvent e) {        displayMessage(" removed from ", e);    }    void displayMessage(String action, ContainerEvent e) {        display.append(((JButton)e.getChild()).getText()                       + " was"                       + action                       + e.getContainer().getClass().getName()                       + newline);        display.setCaretPosition(display.getDocument().getLength());    }    /*     * This could have been implemented as two or three     * classes or objects, for clarity.     */    public void actionPerformed(ActionEvent e) {        String command = e.getActionCommand();        if (ADD.equals(command)) {            JButton newButton = new JButton("JButton #"                                          + (buttonList.size() + 1));            buttonList.addElement(newButton);            buttonPanel.add(newButton);            buttonPanel.revalidate(); //Make the button show up.        } else if (REMOVE.equals(command)) {            int lastIndex = buttonList.size() - 1;            try {                JButton nixedButton = buttonList.elementAt(lastIndex);                buttonPanel.remove(nixedButton);                buttonList.removeElementAt(lastIndex);                buttonPanel.revalidate(); //Make the button disappear.                buttonPanel.repaint(); //Make the button disappear.            } catch (ArrayIndexOutOfBoundsException exc) {}        } else if (CLEAR.equals(command)) {            display.setText("");        }    }    /**     * 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("ContainerEventDemo");        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);        //Create and set up the content pane.        JComponent newContentPane = new ContainerEventDemo();        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一区二区三区免费野_久草精品视频
久88久久88久久久| 欧美裸体bbwbbwbbw| 欧美日韩国产免费一区二区| 久久婷婷国产综合精品青草| 亚洲色图第一区| 极品少妇xxxx精品少妇偷拍| 欧美精品久久99| 中文字幕日韩欧美一区二区三区| 日本亚洲电影天堂| 欧美在线一二三| 国产精品久久久久影院色老大| 另类欧美日韩国产在线| 欧美最猛性xxxxx直播| 欧美激情一区二区| 国产在线精品一区二区三区不卡| 精品视频在线免费观看| 17c精品麻豆一区二区免费| 精品一区免费av| 欧美一区二区三区婷婷月色 | 91天堂素人约啪| 久久一区二区视频| 麻豆视频观看网址久久| 欧美一区午夜视频在线观看| 亚洲黄色录像片| 91欧美一区二区| 国产精品理伦片| 成人黄色小视频| 国产人妖乱国产精品人妖| 国产在线国偷精品免费看| 欧美tk—视频vk| 国产一区不卡精品| 国产亚洲污的网站| 国产69精品久久久久毛片| 亚洲欧美日韩久久| 99精品视频中文字幕| 中文字幕一区二区三中文字幕| 成人高清免费观看| 中文字幕一区二区不卡| 99精品国产视频| 亚洲精品一卡二卡| 欧美性大战久久久久久久蜜臀| 亚洲自拍偷拍网站| 欧美羞羞免费网站| 蜜臀av性久久久久蜜臀aⅴ流畅| 91精品国产综合久久精品| 日韩一区精品字幕| 精品久久久久久久久久久久久久久 | 91香蕉视频在线| 夜夜嗨av一区二区三区四季av| 色94色欧美sute亚洲13| 婷婷国产在线综合| 精品国偷自产国产一区| 国产成人福利片| 亚洲黄色av一区| 日韩亚洲欧美综合| 国产成人精品一区二区三区四区| 国产精品视频麻豆| 欧美日韩视频在线第一区| 蜜桃av一区二区三区电影| 欧美精品一区二区三区蜜桃| 成人亚洲一区二区一| 亚洲男同1069视频| 欧美电影免费观看高清完整版在线观看 | 97久久精品人人做人人爽50路| 成人少妇影院yyyy| 一区二区三区精品| 亚洲精品在线观看网站| 91一区二区三区在线观看| 香蕉加勒比综合久久| 久久亚洲二区三区| 日本乱码高清不卡字幕| 久久精品国产久精国产爱| 国产精品欧美一级免费| 91精品国产一区二区三区| 成人一区二区三区在线观看| 亚洲国产精品麻豆| 国产女人aaa级久久久级| 欧美日韩国产色站一区二区三区| 国产传媒一区在线| 日日欢夜夜爽一区| 日韩一区在线免费观看| 日韩精品一区二区三区在线| 99re66热这里只有精品3直播| 美女一区二区在线观看| 亚洲国产日韩综合久久精品| 国产午夜精品福利| 日韩西西人体444www| 91福利国产成人精品照片| 蜜臀av在线播放一区二区三区 | 日韩高清欧美激情| 亚洲精选一二三| 精品美女在线播放| 欧美日韩一区二区三区在线| caoporn国产精品| 国产麻豆精品theporn| 五月婷婷综合网| 亚洲综合在线视频| 亚洲色图视频网站| 国产精品二三区| 国产丝袜欧美中文另类| 日本欧美在线看| 亚洲一区免费观看| 亚洲精选视频免费看| 亚洲日本在线a| 亚洲欧洲韩国日本视频| 成人免费在线视频| 国产精品久久二区二区| 亚洲国产精品成人久久综合一区| 337p粉嫩大胆色噜噜噜噜亚洲 | 国模一区二区三区白浆| 日韩精品五月天| 亚洲成人动漫在线免费观看| 亚洲人精品午夜| 亚洲免费伊人电影| 亚洲欧美aⅴ...| 一区二区三区国产豹纹内裤在线| 亚洲女同ⅹxx女同tv| 亚洲色图制服诱惑 | 欧美中文字幕一二三区视频| 色综合天天综合网天天看片| 色婷婷精品久久二区二区蜜臀av | 日韩不卡免费视频| 美国av一区二区| 国产精品99久久久久久有的能看| 国产精品一区二区男女羞羞无遮挡| 国产成人福利片| 色吊一区二区三区| 欧美午夜精品久久久久久孕妇| 欧洲日韩一区二区三区| 精品视频1区2区| 精品乱码亚洲一区二区不卡| 久久青草国产手机看片福利盒子 | 精品国产不卡一区二区三区| 日韩精品一区二区在线| 国产欧美日韩一区二区三区在线观看| 国产清纯白嫩初高生在线观看91| 中文字幕一区三区| 婷婷国产在线综合| 国产一区二区女| jlzzjlzz亚洲日本少妇| 欧美日韩中文字幕精品| wwww国产精品欧美| 亚洲日本一区二区三区| 日产国产欧美视频一区精品| 国产成人av自拍| 欧美日韩在线播放一区| 精品88久久久久88久久久| 亚洲欧美日韩国产手机在线| 人人精品人人爱| 成人免费毛片片v| 91精品国产91热久久久做人人| 中文字幕高清一区| 婷婷一区二区三区| 成人亚洲精品久久久久软件| 欧美日韩国产精品成人| 久久综合色天天久久综合图片| 国产精品第五页| 久久精品国内一区二区三区| 91日韩精品一区| 久久久久久久久久久久电影| 亚洲国产wwwccc36天堂| 国产精品亚洲专一区二区三区| 欧美日韩精品一二三区| 亚洲国产精品t66y| 蜜臀av国产精品久久久久| 91精品办公室少妇高潮对白| 久久久精品综合| 免费人成精品欧美精品 | 成人av手机在线观看| 884aa四虎影成人精品一区| 欧美激情在线免费观看| 老司机午夜精品99久久| 欧美性一级生活| 自拍偷在线精品自拍偷无码专区| 精品一区二区免费视频| 欧美图区在线视频| 亚洲精品免费在线播放| 国产1区2区3区精品美女| 日韩一区二区三区视频在线观看| 亚洲精品免费播放| a级精品国产片在线观看| 久久无码av三级| 国产精品一级片在线观看| 日韩欧美电影一区| 日本成人中文字幕| 欧美日韩高清在线播放| 亚洲欧美另类图片小说| www.av亚洲| 综合久久国产九一剧情麻豆| bt7086福利一区国产| 国产精品水嫩水嫩| 国产精品18久久久久久vr| 日韩三级视频在线观看| 男女激情视频一区| 欧美电影免费观看完整版| 极品美女销魂一区二区三区免费| 欧美成人女星排行榜| 精品无人码麻豆乱码1区2区 | 日韩福利视频导航| 在线观看91精品国产麻豆|