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

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

?? scribble.java

?? 本書收入了164個完整的Java編程實例
?? JAVA
字號:
/* * Copyright (c) 2000 David Flanagan.  All rights reserved. * This code is from the book Java Examples in a Nutshell, 2nd Edition. * It is provided AS-IS, WITHOUT ANY WARRANTY either expressed or implied. * You may study, use, and modify it for any non-commercial purpose. * You may distribute it non-commercially as long as you retain this notice. * For a commercial use license, or to purchase the book (recommended), * visit http://www.davidflanagan.com/javaexamples2. */package com.davidflanagan.examples.gui;import java.awt.*;          import java.awt.event.*;    import javax.swing.*;       import javax.swing.border.*;/** * This JFrame subclass is a simple "paint" application. **/public class Scribble extends JFrame {    /**     * The main method instantiates an instance of the class, sets it size,     * and makes it visible on the screen     **/    public static void main(String[] args) {	Scribble scribble = new Scribble();	scribble.setSize(500, 300);	scribble.setVisible(true);    }    // The scribble application relies on the ScribblePane2 component developed    // earlier.  This field holds the ScribblePane2 instance it uses.    ScribblePane2 scribblePane;    /**     * This constructor creates the GUI for this application.     **/    public Scribble() {	super("Scribble");  // Call superclass constructor and set window title	// Handle window close requests	this.addWindowListener(new WindowAdapter() {		public void windowClosing(WindowEvent e) { System.exit(0); }	    });	// All content of a JFrame (except for the menubar) goes in the	// Frame's internal "content pane", not in the frame itself.	// The same is true for JDialog and similar top-level containers.	Container contentPane = this.getContentPane();	// Specify a layout manager for the content pane	contentPane.setLayout(new BorderLayout());	// Create the main scribble pane component, give it a border, and	// a background color, and add it to the content pane	scribblePane = new ScribblePane2();	scribblePane.setBorder(new BevelBorder(BevelBorder.LOWERED));	scribblePane.setBackground(Color.white);	contentPane.add(scribblePane, BorderLayout.CENTER);	// Create a menubar and add it to this window.  Note that JFrame	// handles menus specially and has a special method for adding them	// outside of the content pane.	JMenuBar menubar = new JMenuBar();  // Create a menubar	this.setJMenuBar(menubar);          // Display it in the JFrame	// Create menus and add to the menubar	JMenu filemenu = new JMenu("File");	JMenu colormenu = new JMenu("Color");	menubar.add(filemenu);	menubar.add(colormenu);		// Create some Action objects for use in the menus and toolbars.	// An Action combines a menu title and/or icon with an ActionListener.	// These Action classes are defined as inner classes below.	Action clear = new ClearAction();	Action quit = new QuitAction();	Action black = new ColorAction(Color.black);	Action red = new ColorAction(Color.red);	Action blue = new ColorAction(Color.blue);	Action select = new SelectColorAction();	// Populate the menus using Action objects	filemenu.add(clear);	filemenu.add(quit);	colormenu.add(black);	colormenu.add(red);	colormenu.add(blue);	colormenu.add(select);	// Now create a toolbar, add actions to it, and add it to the	// top of the frame (where it appears underneath the menubar)	JToolBar toolbar = new JToolBar();	toolbar.add(clear);	toolbar.add(select);	toolbar.add(quit);	contentPane.add(toolbar, BorderLayout.NORTH);	// Create another toolbar for use as a color palette and add to 	// the left side of the window.	JToolBar palette = new JToolBar();	palette.add(black);	palette.add(red);	palette.add(blue);	palette.setOrientation(SwingConstants.VERTICAL);	contentPane.add(palette, BorderLayout.WEST);    }    /** This inner class defines the "clear" action that clears the scribble */    class ClearAction extends AbstractAction {	public ClearAction() {	    super("Clear");  // Specify the name of the action	}	public void actionPerformed(ActionEvent e) { scribblePane.clear(); }    }    /** This inner class defines the "quit" action to quit the program */    class QuitAction extends AbstractAction {	public QuitAction() { super("Quit"); }	public void actionPerformed(ActionEvent e) { 	    // Use JOptionPane to confirm that the user really wants to quit	    int response =		JOptionPane.showConfirmDialog(Scribble.this, "Really Quit?");	    if (response == JOptionPane.YES_OPTION) System.exit(0);	}    }    /**     * This inner class defines an Action that sets the current drawing color     * of the ScribblePane2 component.  Note that actions of this type have     * icons rather than labels     **/    class ColorAction extends AbstractAction {	Color color;	public ColorAction(Color color) {	    this.color = color;	    putValue(Action.SMALL_ICON, new ColorIcon(color)); // specify icon	}	public void actionPerformed(ActionEvent e) {	    scribblePane.setColor(color);  // Set current drawing color	}    }    /**     * This inner class implements Icon to draw a solid 16x16 block of the     * specified color.  Most icons are instances of ImageIcon, but since     * we're only using solid colors here, it is easier to implement this     * custom Icon type     **/    static class ColorIcon implements Icon {	Color color;	public ColorIcon(Color color) { this.color = color; }	// These two methods specify the size of the icon	public int getIconHeight() { return 16; }	public int getIconWidth() { return 16; }	// This method draws the icon	public void paintIcon(Component c, Graphics g, int x, int y) {	    g.setColor(color);	    g.fillRect(x, y, 16, 16);	}    }    /**     * This inner class defines an Action that uses JColorChooser to allow     * the user to select a drawing color     **/    class SelectColorAction extends AbstractAction {	public SelectColorAction() { super("Select Color..."); }	public void actionPerformed(ActionEvent e) {	    Color color = JColorChooser.showDialog(Scribble.this,						   "Select Drawing Color",						   scribblePane.getColor());	    if (color != null) scribblePane.setColor(color);	}    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕国产一区二区| 国产成人午夜精品5599| 国产美女久久久久| 在线一区二区三区| 久久男人中文字幕资源站| 亚洲国产成人91porn| 国产91精品精华液一区二区三区| 欧美日韩一区二区三区四区五区| 国产精品久久久久久久久免费樱桃 | 国产精品亲子乱子伦xxxx裸| 精品亚洲aⅴ乱码一区二区三区| fc2成人免费人成在线观看播放 | 国产91综合网| 日韩精品一区二区三区三区免费| 一区二区三区在线免费视频| 99久久精品免费精品国产| 久久精品在这里| 久久国产精品色| 6080亚洲精品一区二区| 亚洲国产日韩在线一区模特| 一本久久综合亚洲鲁鲁五月天| 国产色综合一区| 国产在线一区观看| 精品国产一区二区三区忘忧草| 日韩中文字幕麻豆| 欧美高清视频不卡网| 亚洲一线二线三线久久久| 在线看不卡av| 亚洲国产成人av网| 欧美写真视频网站| 亚洲网友自拍偷拍| 欧美三级视频在线播放| 亚洲国产精品麻豆| 欧美日韩免费视频| 日av在线不卡| 精品欧美一区二区久久| 激情伊人五月天久久综合| 亚洲精品一区二区三区蜜桃下载| 久久精品久久精品| 久久久久九九视频| 成人精品免费看| 亚洲美女少妇撒尿| 欧美日韩午夜在线| 久久成人18免费观看| 久久精品亚洲国产奇米99| 高清日韩电视剧大全免费| 综合婷婷亚洲小说| 欧美色综合久久| 蜜臀av性久久久久av蜜臀妖精| 久久九九久久九九| 一本到不卡免费一区二区| 午夜亚洲福利老司机| 日韩欧美电影在线| 懂色av一区二区三区免费观看| 亚洲欧洲av在线| 欧美浪妇xxxx高跟鞋交| 国内成人自拍视频| 日韩理论片中文av| 日韩一卡二卡三卡四卡| 粉嫩久久99精品久久久久久夜| 一区二区三区在线影院| 欧美一区在线视频| 97se亚洲国产综合自在线观| 天堂一区二区在线| 欧美激情综合五月色丁香小说| 在线亚洲一区观看| 国产毛片精品国产一区二区三区| 亚洲欧美欧美一区二区三区| 69p69国产精品| 白白色 亚洲乱淫| 日本aⅴ免费视频一区二区三区| 国产喷白浆一区二区三区| 欧美色精品在线视频| 国产福利一区二区三区视频| 亚洲成人先锋电影| 欧美激情一区二区在线| 91精品国产综合久久香蕉的特点| 国产精品亚洲成人| 日本午夜一本久久久综合| 国产精品久久久久久久久果冻传媒 | 日韩不卡在线观看日韩不卡视频| 亚洲在线视频一区| 久久久久亚洲综合| 欧美军同video69gay| 91麻豆精品秘密| 国产一级精品在线| 青青草国产精品亚洲专区无| 亚洲女人的天堂| 欧美国产日韩a欧美在线观看| 欧美一区二区三区免费视频| 色综合久久88色综合天天6| 国产精品综合久久| 久久精品久久精品| 五月天婷婷综合| 亚洲午夜在线观看视频在线| 中文字幕一区二区三区乱码在线 | 国产婷婷精品av在线| 日韩三级免费观看| 欧美日韩国产bt| 91啪九色porn原创视频在线观看| 国产乱码精品一区二区三| 免费成人av资源网| 亚洲chinese男男1069| 一区二区三区久久久| 亚洲激情在线播放| 亚洲欧美日韩电影| 亚洲精品视频自拍| 亚洲精品免费在线观看| 亚洲人成亚洲人成在线观看图片| 欧美激情一区二区三区| 中文字幕不卡一区| 日本一区二区久久| 国产精品三级久久久久三级| 欧美国产国产综合| 国产精品麻豆久久久| 亚洲视频一区二区免费在线观看| 国产精品卡一卡二| 亚洲蜜臀av乱码久久精品| 亚洲精品视频在线观看网站| 亚洲精品国产品国语在线app| 亚洲三级在线免费观看| 亚洲国产中文字幕| 天堂蜜桃91精品| 久久国产生活片100| 韩国av一区二区三区在线观看| 国产永久精品大片wwwapp| 国产成人一区在线| av高清不卡在线| 欧美性猛交xxxx乱大交退制版| 欧美日韩久久久久久| 91精品国产一区二区三区蜜臀| 日韩精品一区国产麻豆| 久久看人人爽人人| 亚洲日本va在线观看| 亚洲国产另类av| 久久99久久99| 国产.欧美.日韩| 日本韩国欧美在线| 日韩免费观看高清完整版| 国产午夜精品一区二区三区嫩草 | 欧美精品高清视频| 精品久久久久久无| 国产精品网站一区| 亚洲国产裸拍裸体视频在线观看乱了 | 中文字幕巨乱亚洲| 有坂深雪av一区二区精品| 成人国产精品免费观看视频| 99国产精品久久久久久久久久 | 成人免费视频网站在线观看| 在线观看国产一区二区| 日韩一区二区三区视频在线 | 丁香啪啪综合成人亚洲小说| 在线精品国精品国产尤物884a| 日韩视频在线你懂得| 国产精品女同一区二区三区| 亚洲成av人影院| 成人av午夜电影| 欧美一卡在线观看| 亚洲色图制服诱惑| 国产一区二区视频在线播放| 日本韩国精品在线| 久久精品一区二区三区不卡| 亚洲第一成年网| 成人av在线资源网站| 欧美变态tickle挠乳网站| 一区二区三区四区激情| 国产精品一级二级三级| 欧美日韩精品二区第二页| 国产精品色哟哟| 韩国女主播成人在线观看| 精品1区2区3区| 中文字幕亚洲精品在线观看 | 成人美女视频在线看| 日韩欧美一级二级三级久久久| 亚洲欧美激情小说另类| 国产成人在线网站| 亚洲精品一区二区三区香蕉| 日韩精品亚洲专区| 欧美在线你懂得| 亚洲免费观看高清完整版在线 | 日韩一区精品视频| 色噜噜狠狠一区二区三区果冻| 国产精品免费久久| 国产乱码精品1区2区3区| 欧美一区二区播放| 婷婷国产在线综合| 欧美色爱综合网| 一区二区三区四区国产精品| 91在线观看污| 中文字幕一区二区在线播放| 国产精品1区2区| 久久影院视频免费| 极品销魂美女一区二区三区| 这里只有精品视频在线观看| 亚洲成人精品在线观看| 一本大道久久a久久精品综合| 中文字幕一区二区三中文字幕| 成人激情av网| 亚洲欧洲在线观看av| 成人免费黄色在线|