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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? scribble.java

?? Examples From Java Examples in a Nutshell, 2nd Edition 書(shū)中的源碼
?? JAVA
字號(hào):
/* * 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);	}    }}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲h在线观看| 久久在线观看免费| 成人黄色国产精品网站大全在线免费观看 | 亚洲特黄一级片| 日韩欧美123| 日韩一区和二区| 欧美不卡一区二区三区| 91精品国产一区二区| 欧美一区二区三区日韩视频| 欧美一区二区三区日韩| 精品国产免费一区二区三区香蕉| 精品国精品自拍自在线| 国产日韩精品一区二区三区在线| 国产女人18毛片水真多成人如厕| 国产精品丝袜一区| 亚洲色图19p| 日日夜夜免费精品| 秋霞国产午夜精品免费视频| 久久 天天综合| 99久久国产综合精品麻豆| 91黄色免费版| 日韩一区二区三区视频在线| 日韩免费高清av| 国产精品久久影院| 一区二区三区蜜桃网| 日韩电影在线一区二区三区| 国内精品久久久久影院色 | a在线播放不卡| 欧美在线视频你懂得| 91精品国产丝袜白色高跟鞋| 国产欧美一区二区精品忘忧草| 日韩av中文在线观看| 国产成人在线电影| 欧美日韩精品一区二区在线播放| 欧美一区二区精品久久911| 国产欧美一区二区精品性色| 一区二区欧美精品| 国产一区二区三区不卡在线观看| 91啪九色porn原创视频在线观看| 7777精品伊人久久久大香线蕉| 久久久亚洲精品一区二区三区| 亚洲色图视频网站| 韩国女主播一区| 欧美日韩在线播放三区| 欧美国产精品久久| 奇米888四色在线精品| 91老师片黄在线观看| 欧美videos大乳护士334| 亚洲精品亚洲人成人网 | 中文字幕在线一区| 九九在线精品视频| 欧美日韩免费在线视频| 国产精品久久久久天堂| 国产在线精品一区二区不卡了 | 国产福利视频一区二区三区| 欧美精选一区二区| 亚洲柠檬福利资源导航| 成人app下载| 欧美极品美女视频| 国模冰冰炮一区二区| 91精品国产综合久久小美女| 亚洲伊人色欲综合网| av不卡一区二区三区| 欧美激情在线一区二区三区| 国内精品免费**视频| 精品国产网站在线观看| 日韩成人午夜电影| 欧美美女网站色| 亚洲电影在线播放| 欧美人伦禁忌dvd放荡欲情| 亚洲美女免费在线| 91色porny蝌蚪| 亚洲天堂福利av| 91免费观看视频| 亚洲黄色片在线观看| 99久精品国产| 一区二区三区中文字幕精品精品| av网站一区二区三区| 亚洲欧美在线观看| 在线视频中文字幕一区二区| 尤物视频一区二区| 欧美午夜视频网站| 日韩国产成人精品| 欧美成人乱码一区二区三区| 精品一区二区久久| 欧美—级在线免费片| 91网站在线播放| 午夜欧美在线一二页| 91精品国产综合久久福利| 免费三级欧美电影| 国产午夜亚洲精品午夜鲁丝片| 国产成人免费视频网站| 国产精品欧美一级免费| 99国产精品久久| 视频一区二区欧美| 久久嫩草精品久久久久| 99re这里只有精品首页| 亚洲午夜一二三区视频| 精品欧美一区二区久久| 国产伦精品一区二区三区视频青涩| 久久精子c满五个校花| 色婷婷亚洲综合| 日本最新不卡在线| 中文字幕不卡在线| 欧美性猛片aaaaaaa做受| 精品一区二区三区免费视频| 国产精品萝li| 在线不卡的av| 成人中文字幕合集| 日韩电影在线一区二区三区| 国产目拍亚洲精品99久久精品| 欧洲亚洲精品在线| 国产一区二区三区四| 亚洲男帅同性gay1069| 欧美精品一区二区在线播放| 99久久久无码国产精品| 六月丁香婷婷久久| 亚洲黄色免费网站| 国产日韩欧美精品一区| 欧美系列在线观看| 成人久久视频在线观看| 免费成人你懂的| 亚洲女同一区二区| 国产蜜臀av在线一区二区三区| 欧美日本韩国一区二区三区视频| av毛片久久久久**hd| 蜜臀久久久久久久| 亚洲一区二区三区中文字幕在线| 久久综合九色欧美综合狠狠| 精品视频一区二区不卡| 91在线观看一区二区| 麻豆精品视频在线观看免费| 亚洲午夜久久久久久久久电影网| 国产欧美日韩视频一区二区| 日韩精品中午字幕| 在线播放欧美女士性生活| 欧洲人成人精品| av激情亚洲男人天堂| 国产成人一级电影| 国产一区二区在线观看免费| 日本不卡不码高清免费观看| 亚洲国产欧美在线| 一片黄亚洲嫩模| 136国产福利精品导航| 欧美激情一区二区| 国产丝袜在线精品| 久久久噜噜噜久久中文字幕色伊伊| 3atv一区二区三区| 91精品国产91综合久久蜜臀| 欧美日韩一区成人| 欧美日韩精品三区| 欧美日韩精品一区二区三区四区| 在线观看国产日韩| 欧美图片一区二区三区| 欧美日韩一区二区三区高清| 欧美视频中文一区二区三区在线观看| 在线视频国产一区| 欧美午夜不卡在线观看免费| 日本韩国一区二区三区视频| 一本到不卡免费一区二区| 一本色道a无线码一区v| 91丨九色丨国产丨porny| 一本大道综合伊人精品热热| 在线中文字幕不卡| 欧美日韩国产成人在线91| 4438x亚洲最大成人网| 91精品国产综合久久福利软件 | 国产精品国产三级国产aⅴ入口 | 五月婷婷欧美视频| 日韩电影在线观看电影| 国产一区二区三区在线观看免费 | 欧美不卡在线视频| 中文文精品字幕一区二区| **欧美大码日韩| 亚洲成av人片| 精品在线一区二区三区| 国产mv日韩mv欧美| 91福利精品视频| 欧美一二三四区在线| 久久久久亚洲蜜桃| 亚洲精品美国一| 美美哒免费高清在线观看视频一区二区| 国内一区二区视频| 一本一道久久a久久精品综合蜜臀| 在线观看91精品国产入口| 精品日韩99亚洲| 亚洲三级在线观看| 香蕉加勒比综合久久| 国产成人综合在线观看| 欧美日韩你懂得| 久久精品亚洲一区二区三区浴池| 亚洲精品国产品国语在线app| 五月婷婷久久综合| av激情成人网| 久久女同互慰一区二区三区| 天天综合日日夜夜精品| 成人a区在线观看| 精品蜜桃在线看| 亚洲亚洲精品在线观看| 春色校园综合激情亚洲|