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

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

?? coordinatesdemo.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 painting;/* CoordinatesDemo.java requires no other files. */import javax.swing.*;import java.awt.*;import java.awt.event.MouseEvent;import javax.swing.event.MouseInputListener;/*  * This displays a framed area.  As the user moves the cursor * over the area, a label displays the cursor's location. When  * the user clicks, the area displays a 7x7 dot at the click * location. */public class CoordinatesDemo {    private JLabel label;    private Point clickPoint, cursorPoint;    private void buildUI(Container container) {        container.setLayout(new BoxLayout(container,                                          BoxLayout.PAGE_AXIS));        CoordinateArea coordinateArea = new CoordinateArea(this);        container.add(coordinateArea);        label = new JLabel();        resetLabel();        container.add(label);        //Align the left edges of the components.        coordinateArea.setAlignmentX(Component.LEFT_ALIGNMENT);        label.setAlignmentX(Component.LEFT_ALIGNMENT); //redundant    }    public void updateCursorLocation(int x, int y) {        if (x < 0 || y < 0) {            cursorPoint = null;            updateLabel();            return;        }                    if (cursorPoint == null) {            cursorPoint = new Point();        }                cursorPoint.x = x;        cursorPoint.y = y;        updateLabel();    }    public void updateClickPoint(Point p) {        clickPoint = p;        updateLabel();    }    public void resetLabel() {        cursorPoint = null;        updateLabel();            }        protected void updateLabel() {        String text = "";        if ((clickPoint == null) && (cursorPoint == null)) {            text = "Click or move the cursor within the framed area.";        } else {                        if (clickPoint != null) {                text += "The last click was at ("                         + clickPoint.x + ", " + clickPoint.y + "). ";            }                        if (cursorPoint != null) {                text += "The cursor is at ("                        + cursorPoint.x + ", " + cursorPoint.y + "). ";            }        }                label.setText(text);    }    /**     * 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("CoordinatesDemo");        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);        //Set up the content pane.        CoordinatesDemo controller = new CoordinatesDemo();        controller.buildUI(frame.getContentPane());        //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();             }        });    }    public static class CoordinateArea extends JComponent                                        implements MouseInputListener {        Point point = null;        CoordinatesDemo controller;        Dimension preferredSize = new Dimension(400,75);        Color gridColor;            public CoordinateArea(CoordinatesDemo controller) {            this.controller = controller;                        //Add a border of 5 pixels at the left and bottom,            //and 1 pixel at the top and right.            setBorder(BorderFactory.createMatteBorder(1,5,5,1,                                                      Color.RED));                                                                  addMouseListener(this);            addMouseMotionListener(this);            setBackground(Color.WHITE);            setOpaque(true);        }            public Dimension getPreferredSize() {            return preferredSize;        }            protected void paintComponent(Graphics g) {            //Paint background if we're opaque.            if (isOpaque()) {                g.setColor(getBackground());                g.fillRect(0, 0, getWidth(), getHeight());            }            //Paint 20x20 grid.            g.setColor(Color.GRAY);            drawGrid(g, 20);                        //If user has chosen a point, paint a small dot on top.            if (point != null) {                g.setColor(getForeground());                g.fillRect(point.x - 3, point.y - 3, 7, 7);            }        }                //Draws a 20x20 grid using the current color.        private void drawGrid(Graphics g, int gridSpace) {            Insets insets = getInsets();            int firstX = insets.left;            int firstY = insets.top;            int lastX = getWidth() - insets.right;            int lastY = getHeight() - insets.bottom;                        //Draw vertical lines.            int x = firstX;            while (x < lastX) {                g.drawLine(x, firstY, x, lastY);                x += gridSpace;            }                        //Draw horizontal lines.            int y = firstY;            while (y < lastY) {                g.drawLine(firstX, y, lastX, y);                y += gridSpace;            }        }            //Methods required by the MouseInputListener interface.        public void mouseClicked(MouseEvent e) {             int x = e.getX();            int y = e.getY();            if (point == null) {                point = new Point(x, y);            } else {                point.x = x;                point.y = y;            }            controller.updateClickPoint(point);            repaint();        }        public void mouseMoved(MouseEvent e) {            controller.updateCursorLocation(e.getX(), e.getY());        }        public void mouseExited(MouseEvent e) {             controller.resetLabel();        }        public void mouseReleased(MouseEvent e) { }        public void mouseEntered(MouseEvent e) { }        public void mousePressed(MouseEvent e) { }        public void mouseDragged(MouseEvent e) { }    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产aⅴ天堂久久| 99精品国产视频| 色综合久久99| 欧美精品一区二区久久婷婷| 亚洲二区在线视频| 白白色 亚洲乱淫| 亚洲精品在线网站| 五月婷婷久久综合| 91视视频在线观看入口直接观看www| 日韩精品91亚洲二区在线观看| 国产白丝精品91爽爽久久| 4438x亚洲最大成人网| 亚洲欧美激情插 | 97se亚洲国产综合自在线| 91精品国产综合久久久蜜臀图片 | 久久伊人蜜桃av一区二区| 一区二区三区免费在线观看| 国产91精品一区二区| 精品成人在线观看| 日本亚洲一区二区| 欧美三级电影一区| 亚洲码国产岛国毛片在线| 国产69精品久久久久777| 精品嫩草影院久久| 久久激情五月婷婷| 日韩一级完整毛片| 蜜臀91精品一区二区三区| 欧美二区乱c少妇| 亚洲成人午夜电影| 欧美揉bbbbb揉bbbbb| 亚洲一级不卡视频| 欧美在线一二三| 亚洲高清不卡在线观看| 在线亚洲精品福利网址导航| 一区二区三区日韩精品视频| 一本色道久久综合精品竹菊| 亚洲免费大片在线观看| 91麻豆福利精品推荐| 亚洲日本丝袜连裤袜办公室| 色婷婷久久久久swag精品 | 国产欧美一区二区精品性色| 国产高清视频一区| 欧美国产一区二区| 91欧美一区二区| 亚洲图片欧美视频| 欧美另类高清zo欧美| 日本成人在线网站| 精品国产乱码久久久久久蜜臀 | 亚洲欧美自拍偷拍色图| yourporn久久国产精品| 亚洲综合在线电影| 在线91免费看| 狠狠色综合日日| 亚洲色图丝袜美腿| 在线成人免费视频| 在线观看视频91| 久久精品国产久精国产爱| 久久久高清一区二区三区| 成人网在线播放| 五月婷婷综合在线| 国产亚洲欧美激情| 一本色道综合亚洲| 麻豆成人综合网| |精品福利一区二区三区| 欧美日韩高清影院| 国产精品一区免费在线观看| 亚洲人成伊人成综合网小说| 欧美一区二区三区视频在线| 国产福利一区二区| 夜夜揉揉日日人人青青一国产精品| 91麻豆精品国产91久久久久久| 国产精品一区二区三区四区| 亚洲精品五月天| 精品va天堂亚洲国产| 91美女片黄在线观看91美女| 麻豆91在线播放免费| ●精品国产综合乱码久久久久| 日韩午夜小视频| 91麻豆蜜桃一区二区三区| 九色综合狠狠综合久久| 一区二区久久久久久| 欧美v亚洲v综合ⅴ国产v| 日本高清不卡在线观看| 国产一区二区三区不卡在线观看 | 亚洲啪啪综合av一区二区三区| 91精品国产综合久久精品app| 久久综合精品国产一区二区三区| 91影院在线观看| 黄网站免费久久| 日本美女视频一区二区| 夜色激情一区二区| 亚洲欧洲精品一区二区三区 | 91精品国产品国语在线不卡| 成人不卡免费av| 国产综合色在线视频区| 午夜久久久久久| 一区二区三区视频在线看| 国产精品网站导航| 久久免费看少妇高潮| 欧美丰满美乳xxx高潮www| 91猫先生在线| 色综合久久久久综合体桃花网| 国产成人免费在线视频| 奇米精品一区二区三区在线观看一 | 成人毛片视频在线观看| 蜜臀av一级做a爰片久久| 亚洲尤物视频在线| 亚洲女与黑人做爰| 国产精品国产三级国产有无不卡 | 欧美成人午夜电影| 欧美三级乱人伦电影| 91成人免费在线视频| 成人av中文字幕| 国产91精品露脸国语对白| 国产乱子轮精品视频| 热久久国产精品| 日本不卡一二三区黄网| 日本亚洲免费观看| 日产欧产美韩系列久久99| 免费在线视频一区| 青青草97国产精品免费观看| 麻豆91免费看| 国产精品一二三区在线| 国产精品一区二区91| 国产精品一区二区黑丝| 成人av网址在线| 91传媒视频在线播放| 欧美日韩国产另类不卡| 欧美一级欧美三级| 久久影院午夜论| 中文字幕中文字幕中文字幕亚洲无线| 国产精品久久久久永久免费观看 | 自拍偷拍亚洲欧美日韩| 日韩美女久久久| 香蕉久久夜色精品国产使用方法| 五月开心婷婷久久| 日本成人在线不卡视频| 激情都市一区二区| av中文字幕不卡| 欧美图片一区二区三区| 日韩一区二区视频| 中文字幕国产一区二区| 亚洲久草在线视频| 亚洲国产日韩一级| 久久av中文字幕片| 不卡欧美aaaaa| 欧美久久久一区| 亚洲国产精品成人综合| ㊣最新国产の精品bt伙计久久| 亚洲第一福利一区| 国产裸体歌舞团一区二区| 色又黄又爽网站www久久| 精品视频资源站| 国产日本亚洲高清| 亚洲色大成网站www久久九九| 青青国产91久久久久久| 国产福利一区二区三区| 欧美三级中文字幕| 国产日韩在线不卡| 香蕉影视欧美成人| 国产91清纯白嫩初高中在线观看| 欧美三级视频在线播放| 国产亚洲精品bt天堂精选| 亚洲国产精品嫩草影院| 国产69精品久久久久777| 制服丝袜亚洲网站| 中文字幕日韩av资源站| 麻豆精品国产91久久久久久| 91福利区一区二区三区| 国产亚洲精品精华液| 欧美a一区二区| 欧美日韩在线免费视频| 国产精品久久久久久久久晋中| 日韩av中文字幕一区二区三区| 色综合久久综合中文综合网| 久久免费午夜影院| 日韩高清不卡一区二区| 91国产成人在线| 中文字幕av一区二区三区免费看 | 91看片淫黄大片一级在线观看| 精品久久久久久无| 亚洲bt欧美bt精品| 色av成人天堂桃色av| 国产婷婷色一区二区三区 | 亚洲一区二区三区中文字幕| 豆国产96在线|亚洲| 久久综合久久99| 精品一二线国产| 91精品国产色综合久久不卡蜜臀 | 精品福利视频一区二区三区| 午夜精品成人在线| 欧美性淫爽ww久久久久无| 国产精品美女久久福利网站| 国产成人在线视频网址| 91精品国产一区二区三区香蕉| 亚洲一区二区av电影| 欧美日韩一级大片网址| 亚洲一区二区三区中文字幕在线 | 日日摸夜夜添夜夜添精品视频| 欧美午夜精品久久久久久超碰|