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

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

?? framedemo2.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 java.awt.*;import java.awt.event.*;import java.awt.image.BufferedImage;/* * FrameDemo2.java shows off the window decoration features added in * 1.4, plus some window positioning code and (optionally) * setIconImage. It uses the file images/FD.jpg. */public class FrameDemo2 extends WindowAdapter                        implements ActionListener {    private Point lastLocation = null;    private int maxX = 500;    private int maxY = 500;    //the main frame's default button    private static JButton defaultButton = null;    //constants for action commands    protected final static String NO_DECORATIONS = "no_dec";    protected final static String LF_DECORATIONS = "laf_dec";    protected final static String WS_DECORATIONS = "ws_dec";    protected final static String CREATE_WINDOW = "new_win";    protected final static String DEFAULT_ICON = "def_icon";    protected final static String FILE_ICON = "file_icon";    protected final static String PAINT_ICON = "paint_icon";    //true if the next frame created should have no window decorations    protected boolean noDecorations = false;    //true if the next frame created should have setIconImage called    protected boolean specifyIcon = false;    //true if the next frame created should have a custom painted icon    protected boolean createIcon = false;    //Perform some initialization.    public FrameDemo2() {        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();        maxX = screenSize.width - 50;        maxY = screenSize.height - 50;    }    //Create a new MyFrame object and show it.    public void showNewWindow() {        JFrame frame = new MyFrame();        //Take care of the no window decorations case.        //NOTE: Unless you really need the functionality        //provided by JFrame, you would usually use a        //Window or JWindow instead of an undecorated JFrame.        if (noDecorations) {            frame.setUndecorated(true);        }        //Set window location.        if (lastLocation != null) {            //Move the window over and down 40 pixels.            lastLocation.translate(40, 40);            if ((lastLocation.x > maxX) || (lastLocation.y > maxY)) {                lastLocation.setLocation(0, 0);            }            frame.setLocation(lastLocation);        } else {            lastLocation = frame.getLocation();        }        //Calling setIconImage sets the icon displayed when the window        //is minimized.  Most window systems (or look and feels, if        //decorations are provided by the look and feel) also use this        //icon in the window decorations.        if (specifyIcon) {            if (createIcon) {                frame.setIconImage(createFDImage()); //create an icon from scratch            } else {                frame.setIconImage(getFDImage());    //get the icon from a file            }        }        //Show window.        frame.setSize(new Dimension(170, 100));        frame.setVisible(true);    }    // Create the window-creation controls that go in the main window.    protected JComponent createOptionControls() {        JLabel label1 = new JLabel("Decoration options for subsequently created frames:");        ButtonGroup bg1 = new ButtonGroup();        JLabel label2 = new JLabel("Icon options:");        ButtonGroup bg2 = new ButtonGroup();        //Create the buttons        JRadioButton rb1 = new JRadioButton();        rb1.setText("Look and feel decorated");        rb1.setActionCommand(LF_DECORATIONS);        rb1.addActionListener(this);        rb1.setSelected(true);        bg1.add(rb1);        //        JRadioButton rb2 = new JRadioButton();        rb2.setText("Window system decorated");        rb2.setActionCommand(WS_DECORATIONS);        rb2.addActionListener(this);        bg1.add(rb2);        //        JRadioButton rb3 = new JRadioButton();        rb3.setText("No decorations");        rb3.setActionCommand(NO_DECORATIONS);        rb3.addActionListener(this);        bg1.add(rb3);        //        //        JRadioButton rb4 = new JRadioButton();        rb4.setText("Default icon");        rb4.setActionCommand(DEFAULT_ICON);        rb4.addActionListener(this);        rb4.setSelected(true);        bg2.add(rb4);        //        JRadioButton rb5 = new JRadioButton();        rb5.setText("Icon from a JPEG file");        rb5.setActionCommand(FILE_ICON);        rb5.addActionListener(this);        bg2.add(rb5);        //        JRadioButton rb6 = new JRadioButton();        rb6.setText("Painted icon");        rb6.setActionCommand(PAINT_ICON);        rb6.addActionListener(this);        bg2.add(rb6);        //Add everything to a container.        Box box = Box.createVerticalBox();        box.add(label1);        box.add(Box.createVerticalStrut(5)); //spacer        box.add(rb1);        box.add(rb2);        box.add(rb3);        //        box.add(Box.createVerticalStrut(15)); //spacer        box.add(label2);        box.add(Box.createVerticalStrut(5)); //spacer        box.add(rb4);        box.add(rb5);        box.add(rb6);        //Add some breathing room.        box.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));        return box;    }    //Create the button that goes in the main window.    protected JComponent createButtonPane() {        JButton button = new JButton("New window");        button.setActionCommand(CREATE_WINDOW);        button.addActionListener(this);        defaultButton = button; //Used later to make this the frame's default button.        //Center the button in a panel with some space around it.        JPanel pane = new JPanel(); //use default FlowLayout        pane.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));        pane.add(button);        return pane;    }    //Handle action events from all the buttons.    public void actionPerformed(ActionEvent e) {        String command = e.getActionCommand();        //Handle the New window button.        if (CREATE_WINDOW.equals(command)) {            showNewWindow();        //Handle the first group of radio buttons.        } else if (NO_DECORATIONS.equals(command)) {            noDecorations = true;            JFrame.setDefaultLookAndFeelDecorated(false);        } else if (WS_DECORATIONS.equals(command)) {            noDecorations = false;            JFrame.setDefaultLookAndFeelDecorated(false);        } else if (LF_DECORATIONS.equals(command)) {            noDecorations = false;            JFrame.setDefaultLookAndFeelDecorated(true);        //Handle the second group of radio buttons.        } else if (DEFAULT_ICON.equals(command)) {            specifyIcon = false;        } else if (FILE_ICON.equals(command)) {            specifyIcon = true;            createIcon = false;        } else if (PAINT_ICON.equals(command)) {            specifyIcon = true;            createIcon = true;        }    }    //Creates an icon-worthy Image from scratch.    protected static Image createFDImage() {        //Create a 16x16 pixel image.        BufferedImage bi = new BufferedImage(16, 16, BufferedImage.TYPE_INT_RGB);        //Draw into it.        Graphics g = bi.getGraphics();        g.setColor(Color.BLACK);        g.fillRect(0, 0, 15, 15);        g.setColor(Color.RED);        g.fillOval(5, 3, 6, 6);        //Clean up.        g.dispose();        //Return it.        return bi;    }    //Returns an Image or null.    protected static Image getFDImage() {        java.net.URL imgURL = FrameDemo2.class.getResource("images/FD.jpg");        if (imgURL != null) {            return new ImageIcon(imgURL).getImage();        } else {            return null;        }    }    /**     * Create the GUI and show it.  For thread safety,     * this method should be invoked from the     * event-dispatching thread.     */    private static void createAndShowGUI() {        //Use the Java look and feel.        try {            UIManager.setLookAndFeel(                UIManager.getCrossPlatformLookAndFeelClassName());        } catch (Exception e) { }        //Make sure we have nice window decorations.        JFrame.setDefaultLookAndFeelDecorated(true);        JDialog.setDefaultLookAndFeelDecorated(true);        //Instantiate the controlling class.        JFrame frame = new JFrame("FrameDemo2");        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);        //Create and set up the content pane.        FrameDemo2 demo = new FrameDemo2();        //Add components to it.        Container contentPane = frame.getContentPane();        contentPane.add(demo.createOptionControls(),                        BorderLayout.CENTER);        contentPane.add(demo.createButtonPane(),                        BorderLayout.PAGE_END);        frame.getRootPane().setDefaultButton(defaultButton);        //Display the window.        frame.pack();        frame.setLocationRelativeTo(null); //center it        frame.setVisible(true);    }    //Start the demo.    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();            }        });    }    class MyFrame extends JFrame implements ActionListener {        //Create a frame with a button.        public MyFrame() {            super("A window");            setDefaultCloseOperation(DISPOSE_ON_CLOSE);            //This button lets you close even an undecorated window.            JButton button = new JButton("Close window");            button.addActionListener(this);            //Place the button near the bottom of the window.            Container contentPane = getContentPane();            contentPane.setLayout(new BoxLayout(contentPane,                                                BoxLayout.PAGE_AXIS));            contentPane.add(Box.createVerticalGlue()); //takes all extra space            contentPane.add(button);            button.setAlignmentX(Component.CENTER_ALIGNMENT); //horizontally centered            contentPane.add(Box.createVerticalStrut(5)); //spacer        }        //Make the button do the same thing as the default close operation        //(DISPOSE_ON_CLOSE).        public void actionPerformed(ActionEvent e) {            setVisible(false);            dispose();        }    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品视频免费看| 欧美三片在线视频观看| 五月激情综合网| 国产黄色精品网站| www.亚洲激情.com| 91麻豆精品在线观看| 日韩一区二区三区视频在线| 国产精品视频免费看| 另类综合日韩欧美亚洲| kk眼镜猥琐国模调教系列一区二区 | 国产精品色呦呦| 偷窥国产亚洲免费视频| 国产99久久久国产精品潘金| 91麻豆123| 国产日韩欧美高清在线| 午夜婷婷国产麻豆精品| 欧洲一区在线电影| 欧美激情在线观看视频免费| 亚洲gay无套男同| 91老师片黄在线观看| 2023国产精品| 丝袜美腿一区二区三区| 制服丝袜亚洲播放| 亚洲欧洲韩国日本视频| 成人性生交大合| 日韩精品一区二区三区swag | 亚洲线精品一区二区三区八戒| 国内精品久久久久影院色 | av不卡免费在线观看| 日韩一区二区三区在线| 亚洲午夜精品17c| 欧美一a一片一级一片| 国产日韩欧美a| 亚洲国产成人精品视频| 欧美三级韩国三级日本三斤| 亚洲欧洲精品天堂一级 | 成人动漫一区二区| www欧美成人18+| 日韩电影免费一区| 日韩精品一区二区三区蜜臀| 亚洲一区二区三区四区的| 91美女片黄在线| 国产精品日日摸夜夜摸av| 国产成人午夜视频| 久久午夜羞羞影院免费观看| 亚洲影院理伦片| av成人免费在线观看| 亚洲精品视频在线观看网站| av激情亚洲男人天堂| 亚洲综合色在线| 欧美视频一区在线观看| 亚洲日穴在线视频| 欧美日韩日日夜夜| 亚洲18影院在线观看| 欧美大片在线观看一区二区| 捆绑调教一区二区三区| 日韩精品一区在线| 国产成人精品免费| 亚洲天堂精品视频| 色综合天天综合色综合av| 亚洲色图一区二区| 色综合久久综合网97色综合 | 精品三级在线观看| 国产伦精品一区二区三区免费迷 | 免费黄网站欧美| 久久精品视频一区| gogo大胆日本视频一区| 男人的天堂亚洲一区| 精品国产乱码久久久久久影片| 久久国产三级精品| 亚洲视频免费看| 欧美主播一区二区三区| 精品亚洲欧美一区| 中文字幕日韩一区| 欧美日韩中文精品| 成人一道本在线| 亚洲美女一区二区三区| 久久久综合网站| 一本色道久久综合亚洲精品按摩| 亚洲成av人片一区二区三区| 国产日韩欧美综合一区| 欧美亚洲国产一区二区三区| 国产精品免费视频一区| 欧美一级日韩一级| 国产精品1区二区.| 日本最新不卡在线| 中文字幕 久热精品 视频在线| 色综合久久综合| 成人亚洲一区二区一| 亚洲成a人片在线观看中文| 中文字幕av一区二区三区高| 日本道免费精品一区二区三区| 美女视频第一区二区三区免费观看网站| 国产精品欧美一区喷水| 欧美日韩小视频| 一区二区在线免费观看| 亚洲精品在线观看网站| 91精彩视频在线| 99久久婷婷国产综合精品| 免费精品视频最新在线| 中文字幕一区二区三区在线播放 | 天天综合日日夜夜精品| 亚洲人成影院在线观看| 精品毛片乱码1区2区3区| 91丨porny丨蝌蚪视频| 大桥未久av一区二区三区中文| 日欧美一区二区| 亚洲午夜影视影院在线观看| 国产视频一区不卡| 精品乱人伦小说| 欧美日韩一区二区在线观看视频| 狠狠色伊人亚洲综合成人| 亚洲午夜精品17c| 亚洲欧美日韩在线不卡| 精品国产一区二区三区久久影院| 在线电影欧美成精品| 成人高清在线视频| 色婷婷av久久久久久久| 成人网男人的天堂| 久久国产精品72免费观看| 日本免费新一区视频| 亚洲va欧美va天堂v国产综合| 亚洲成在人线在线播放| 亚洲激情图片一区| 视频一区视频二区中文字幕| 亚洲国产视频网站| 一区二区三区欧美日| 午夜国产精品一区| 亚洲国产精品久久艾草纯爱| 另类成人小视频在线| 日韩在线一区二区三区| 亚洲视频香蕉人妖| 三级久久三级久久| 日本亚洲最大的色成网站www| 男男gaygay亚洲| 免费视频最近日韩| 午夜精品久久久久久久久久| 日日欢夜夜爽一区| 蜜臀av亚洲一区中文字幕| 国产精品一区二区久激情瑜伽| 国产毛片精品国产一区二区三区| 99精品视频一区二区三区| av不卡在线播放| 99精品热视频| 日韩欧美在线1卡| 久久精品男人天堂av| 亚洲视频 欧洲视频| 亚洲午夜在线视频| 国内精品久久久久影院一蜜桃| 国产69精品久久777的优势| 国产mv日韩mv欧美| 欧美日韩精品是欧美日韩精品| 欧美日韩aaaaaa| 国产欧美精品一区二区色综合朱莉| 国产午夜亚洲精品理论片色戒| 2020国产精品自拍| 一区二区三区欧美日| 蜜桃av一区二区三区电影| 一本一道久久a久久精品综合蜜臀| 色综合天天综合色综合av| 91日韩一区二区三区| 777久久久精品| 日本一区二区三区国色天香| 日韩综合一区二区| 国产成人在线免费观看| 欧美久久免费观看| 国产欧美日韩另类一区| 免费观看在线综合| 成人激情免费网站| 91视视频在线观看入口直接观看www| 日韩一卡二卡三卡| 国产精品久久久久aaaa樱花| 捆绑调教美女网站视频一区| 99久久精品国产一区| 国产亚洲精品资源在线26u| 一区二区三区加勒比av| 青青青伊人色综合久久| 不卡视频免费播放| 日韩无一区二区| 午夜精品久久久久久久久| 国产激情一区二区三区四区 | 综合欧美一区二区三区| 日韩电影一区二区三区四区| 欧美专区日韩专区| 国产亚洲综合在线| 久久精品久久精品| 91福利国产成人精品照片| 亚洲欧洲av在线| 久久66热偷产精品| 色综合久久久网| 亚洲欧洲另类国产综合| 国内成人自拍视频| 精品国产凹凸成av人网站| 亚洲福利国产精品| 欧日韩精品视频| 亚洲黄色尤物视频| 懂色av一区二区三区蜜臀| 精品精品欲导航| 男女男精品视频网| 精品精品国产高清一毛片一天堂|