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

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

?? lunarphasesrb.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 QandE;/*
 * LunarPhasesRB.java requires the following files:
 *    images/image0.jpg
 *    images/image1.jpg
 *    images/image2.jpg
 *    images/image3.jpg
 *    images/image4.jpg
 *    images/image5.jpg
 *    images/image6.jpg
 *    images/image7.jpg
 * It is a modified version of LunarPhases.java that
 * uses radio buttons instead of a combo box.
 */
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.net.URL;

public class LunarPhasesRB implements ActionListener {
    final static int NUM_IMAGES = 8;
    final static int START_INDEX = 3;

    ImageIcon[] images = new ImageIcon[NUM_IMAGES];
    JPanel mainPanel, selectPanel, displayPanel;

    JLabel phaseIconLabel = null;

    public LunarPhasesRB() {
        //Create the phase selection and display panels.
        selectPanel = new JPanel();
        displayPanel = new JPanel();

        //Add various widgets to the sub panels.
        addWidgets();

        //Create the main panel to contain the two sub panels.
        mainPanel = new JPanel();
        mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.PAGE_AXIS));
        mainPanel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));

        //Add the select and display panels to the main panel.
        mainPanel.add(selectPanel);
        mainPanel.add(displayPanel);
    }

    /*
     * Get the images and set up the widgets.
     */
    private void addWidgets() {
        /*
         * Create a label for displaying the moon phase images and
         * put a border around it.
         */
        phaseIconLabel = new JLabel();
        phaseIconLabel.setHorizontalAlignment(JLabel.CENTER);
        phaseIconLabel.setVerticalAlignment(JLabel.CENTER);
        phaseIconLabel.setVerticalTextPosition(JLabel.CENTER);
        phaseIconLabel.setHorizontalTextPosition(JLabel.CENTER);
        phaseIconLabel.setBorder(BorderFactory.createCompoundBorder(
            BorderFactory.createLoweredBevelBorder(),
            BorderFactory.createEmptyBorder(5,5,5,5)));

        phaseIconLabel.setBorder(BorderFactory.createCompoundBorder(
            BorderFactory.createEmptyBorder(0,0,10,0),
            phaseIconLabel.getBorder()));

	//Create radio buttons with lunar phase choices.
	JRadioButton newButton = new JRadioButton("New");
	newButton.setActionCommand("0");
	newButton.setSelected(true);

	JRadioButton waxingCrescentButton =  new JRadioButton("Waxing Crescent");
	waxingCrescentButton.setActionCommand("1");

	JRadioButton firstQuarterButton = new JRadioButton("First Quarter");
	firstQuarterButton.setActionCommand("2");

	JRadioButton waxingGibbousButton = new JRadioButton("Waxing Gibbous");
	waxingGibbousButton.setActionCommand("3");

	JRadioButton fullButton = new JRadioButton("Full");
	fullButton.setActionCommand("4");

	JRadioButton waningGibbousButton = new JRadioButton("Waning Gibbous");
	waningGibbousButton.setActionCommand("5");

	JRadioButton thirdQuarterButton = new JRadioButton("Third Quarter");
	thirdQuarterButton.setActionCommand("6");

	JRadioButton waningCrescentButton = new JRadioButton("Waning Crescent");
	waningCrescentButton.setActionCommand("7");

	// Create a button group and add the radio buttons.
	ButtonGroup group = new ButtonGroup();
	group.add(newButton);
	group.add(waxingCrescentButton);
	group.add(firstQuarterButton);
	group.add(waxingGibbousButton);
	group.add(fullButton);
	group.add(waningGibbousButton);
	group.add(thirdQuarterButton);
	group.add(waningCrescentButton);

        // Display the first image.
        phaseIconLabel.setIcon(new ImageIcon("images/image0.jpg"));
        phaseIconLabel.setText("");

	  //Make the radio buttons appear in a center-aligned column.
        selectPanel.setLayout(new BoxLayout(selectPanel, BoxLayout.PAGE_AXIS));
	  selectPanel.setAlignmentX(Component.CENTER_ALIGNMENT);

        //Add a border around the select panel.
        selectPanel.setBorder(BorderFactory.createCompoundBorder(
            BorderFactory.createTitledBorder("Select Phase"), 
            BorderFactory.createEmptyBorder(5,5,5,5)));

        //Add a border around the display panel.
        displayPanel.setBorder(BorderFactory.createCompoundBorder(
            BorderFactory.createTitledBorder("Display Phase"), 
            BorderFactory.createEmptyBorder(5,5,5,5)));

        //Add image and moon phases radio buttons to select panel.
        displayPanel.add(phaseIconLabel);
 	  selectPanel.add(newButton);
	  selectPanel.add(waxingCrescentButton);
	  selectPanel.add(firstQuarterButton);
	  selectPanel.add(waxingGibbousButton);
	  selectPanel.add(fullButton);
	  selectPanel.add(waningGibbousButton);
	  selectPanel.add(thirdQuarterButton);
	  selectPanel.add(waningCrescentButton);

        //Listen to events from the radio buttons.
	  newButton.addActionListener(this);
	  waxingCrescentButton.addActionListener(this);
	  firstQuarterButton.addActionListener(this);
	  waxingGibbousButton.addActionListener(this);
	  fullButton.addActionListener(this);
	  waningGibbousButton.addActionListener(this);
	  thirdQuarterButton.addActionListener(this);
	  waningCrescentButton.addActionListener(this);

    }

    // Load the selected image (lazy image loading).
    public void actionPerformed(ActionEvent event) {
	  phaseIconLabel.setIcon(new ImageIcon("images/image" 
					     + event.getActionCommand() 
					     + ".jpg"));
    }

    /**
     * Create the GUI and show it.  For thread safety,
     * this method should be invoked from the
     * event-dispatching thread.
     */
    private static void createAndShowGUI() {
        //Create a new instance of LunarPhasesRB.
        LunarPhasesRB phases = new LunarPhasesRB();

        //Create and set up the window.
        JFrame lunarPhasesFrame = new JFrame("Lunar Phases");
        lunarPhasesFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 
        lunarPhasesFrame.setContentPane(phases.mainPanel);

        //Display the window.
        lunarPhasesFrame.pack();
        lunarPhasesFrame.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一区二区三区免费野_久草精品视频
国产成人自拍在线| 日韩欧美一二三四区| 欧美综合一区二区三区| 精品国产区一区| 午夜欧美视频在线观看| 成人午夜电影小说| 欧美成人一区二区三区片免费 | 成人欧美一区二区三区在线播放| 亚洲不卡av一区二区三区| 国产成人h网站| 久久综合狠狠综合久久综合88| 亚洲一区免费观看| 99热这里都是精品| 国产欧美日韩在线视频| 久久99国产精品久久99果冻传媒| 欧美综合一区二区| 伊人婷婷欧美激情| av在线不卡电影| 国产日产欧产精品推荐色| 九色综合狠狠综合久久| 欧美一区二区免费视频| 亚洲国产一区二区视频| 91理论电影在线观看| 中文字幕第一区二区| 国产精品一区一区| 久久亚洲一区二区三区明星换脸 | 国产v综合v亚洲欧| www欧美成人18+| 久久国产精品色婷婷| 欧美一级高清片| 日韩激情中文字幕| 日韩写真欧美这视频| 日韩精品福利网| 欧美成人一区二区三区片免费| 美女视频免费一区| 精品电影一区二区三区| 国内精品嫩模私拍在线| 国产午夜精品久久久久久免费视| 国精产品一区一区三区mba桃花 | 日本成人在线电影网| 制服丝袜国产精品| 狠狠色狠狠色综合日日91app| 欧美xxxxxxxx| 成人手机在线视频| 国产欧美一区二区精品秋霞影院| 精品国产露脸精彩对白| 精品精品欲导航| 中文字幕 久热精品 视频在线| 欧美影片第一页| 国产综合色精品一区二区三区| 免费xxxx性欧美18vr| 成人福利视频在线| 国产欧美一区二区精品忘忧草| 1区2区3区精品视频| 久久视频一区二区| 国产精品久久午夜| 一区二区三区在线影院| 精品国内片67194| 欧美剧情片在线观看| 成人一区二区在线观看| 欧美一区二区在线不卡| 717成人午夜免费福利电影| 欧美自拍偷拍一区| 日韩高清欧美激情| 麻豆极品一区二区三区| 日韩激情视频在线观看| 欧美性猛片xxxx免费看久爱| 久久精品人人做人人综合 | 一区在线播放视频| 国产成a人无v码亚洲福利| 26uuu精品一区二区在线观看| 精品一区二区免费| wwww国产精品欧美| av不卡免费电影| 婷婷开心激情综合| 成人的网站免费观看| 国产精品卡一卡二| 91女厕偷拍女厕偷拍高清| 欧美韩国日本一区| 一本大道综合伊人精品热热| 亚洲综合999| 欧美一区二区三区白人| 夫妻av一区二区| 天天综合天天做天天综合| 久久综合色8888| 日韩精品一区第一页| 欧美精品一区二区三区在线播放 | 精品粉嫩超白一线天av| aaa欧美色吧激情视频| 亚洲综合小说图片| 一区二区三区精品视频在线| xnxx国产精品| 国产一区二区三区香蕉| 日韩一级大片在线观看| 一本久久a久久免费精品不卡| 亚洲超碰精品一区二区| 国产欧美一区在线| 欧美性一级生活| 成人久久视频在线观看| 日韩av电影免费观看高清完整版| 精品国产乱码久久久久久图片| 欧洲另类一二三四区| zzijzzij亚洲日本少妇熟睡| 国产精品69久久久久水密桃| 亚洲欧美偷拍三级| 精品毛片乱码1区2区3区| 国产一区二区三区四区五区美女| 亚洲老司机在线| 《视频一区视频二区| 久久精品在这里| 国产清纯白嫩初高生在线观看91 | 韩国理伦片一区二区三区在线播放| 日韩精品福利网| 精品一区二区三区欧美| 欧美精品 国产精品| 色综合久久综合| 欧美日韩在线三级| 精品视频在线看| 日韩精品一区二区三区视频| 欧美电影免费观看完整版| 精品国精品国产| 久久久美女毛片| 亚洲综合色噜噜狠狠| 国产尤物一区二区| 色哟哟亚洲精品| 亚洲午夜电影网| 亚洲成人av福利| 高清不卡一二三区| 欧美日韩一区不卡| 精品国产一区二区三区不卡| 亚洲欧美日韩国产一区二区三区| 亚洲一区二区三区三| 成人午夜免费电影| 天堂久久一区二区三区| 亚洲国产成人在线| 国产精品久久午夜夜伦鲁鲁| 久久99久久99精品免视看婷婷| 不卡在线视频中文字幕| 欧美一区二区在线免费观看| 日韩三级免费观看| 日韩中文字幕不卡| 7777精品伊人久久久大香线蕉完整版| 亚洲欧洲日韩女同| 色嗨嗨av一区二区三区| 亚洲在线一区二区三区| 欧美日本在线看| 韩国理伦片一区二区三区在线播放| 精品久久久久久久人人人人传媒| 久久超碰97人人做人人爱| 精品在线观看免费| 中文一区二区在线观看| 欧洲色大大久久| 国产一区亚洲一区| 亚洲男人的天堂在线观看| 欧美高清视频一二三区| 国产伦精一区二区三区| 亚洲综合一二三区| 久久综合九色综合97婷婷女人 | 久久蜜桃av一区精品变态类天堂 | 国产一区视频导航| 制服丝袜激情欧洲亚洲| 五月婷婷色综合| 欧美日韩一区二区三区免费看| 亚洲女子a中天字幕| 欧美性淫爽ww久久久久无| 亚洲激情自拍视频| 欧美少妇xxx| 国产一区亚洲一区| 免费一级片91| 免费看黄色91| 日本欧美加勒比视频| 日韩国产在线一| 婷婷综合久久一区二区三区| 久久影院午夜论| 91黄视频在线观看| 免费观看在线综合色| 亚洲欧美一区二区三区极速播放 | 97精品电影院| 日本不卡1234视频| 亚洲一区二区四区蜜桃| 久久综合色8888| 欧美三级视频在线播放| 成人av电影在线播放| 麻豆久久一区二区| 婷婷开心久久网| 亚洲综合精品自拍| 国产精品午夜久久| 久久色在线视频| 91精品国产综合久久精品图片| 91福利国产成人精品照片| 成人91在线观看| a美女胸又www黄视频久久| 波多野结衣亚洲| 一本一本大道香蕉久在线精品| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 91丨九色丨蝌蚪富婆spa| 色综合久久久久综合体| 欧美日韩中文精品| 精品国产精品一区二区夜夜嗨| 久久免费视频一区|