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

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

?? simpledateformatdemo.java

?? java tutorial.sun公司官方出品。java入門書籍。最新版
?? 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. */ import java.applet.Applet;import java.awt.*;import java.awt.event.*;import com.sun.java.swing.*;import com.sun.java.swing.border.*;import java.util.*;import java.text.*;public class SimpleDateFormatDemo extends JPanel {    static JFrame frame;    JLabel result;    String currentPattern;    Date today;    LocaleGroup availableLocales;    public SimpleDateFormatDemo() {         today = new Date();        availableLocales = new LocaleGroup();         String[] patternExamples = {                  "dd MMMMM yyyy",                 "dd.MM.yy",                  "MM/dd/yy",                 "yyyy.MM.dd G 'at' hh:mm:ss z",                 "EEE, MMM d, ''yy",                 "h:mm a",                 "H:mm:ss:SSS",                 "K:mm a,z",                 "yyyy.MMMMM.dd GGG hh:mm aaa"                 };        currentPattern = patternExamples[0];         // Set up the UI for selecting a pattern.        JLabel patternLabel1 = new JLabel("Enter the pattern string or");        JLabel patternLabel2 = new JLabel("select one from the list:");        patternLabel1.setAlignmentX(Component.LEFT_ALIGNMENT);        patternLabel2.setAlignmentX(Component.LEFT_ALIGNMENT);            JComboBox patternList = new JComboBox(patternExamples);        patternList.setSelectedIndex(0);        patternList.setEditable(true);        patternList.setAlignmentX(Component.LEFT_ALIGNMENT);        PatternListener patternListener = new PatternListener();        patternList.addActionListener(patternListener);            // Set up the UI for selecting a locale.        JLabel localeLabel = new JLabel("Select a Locale from the list:");        localeLabel.setAlignmentX(Component.LEFT_ALIGNMENT);            JComboBox localeList = new JComboBox(availableLocales.getStrings());        localeList.setSelectedIndex(0);        localeList.setAlignmentX(Component.LEFT_ALIGNMENT);        LocaleListener localeListener = new LocaleListener();        localeList.addActionListener(localeListener);            // Create the UI for displaying result        JLabel resultLabel = new JLabel("Current Date and Time", JLabel.LEFT);        resultLabel.setAlignmentX(Component.LEFT_ALIGNMENT);        result = new JLabel(" ");        result.setForeground(Color.black);        result.setAlignmentX(Component.LEFT_ALIGNMENT);        result.setBorder(BorderFactory.createCompoundBorder(             BorderFactory.createLineBorder(Color.black),             BorderFactory.createEmptyBorder(5,5,5,5)        ));            // Lay out everything        JPanel patternPanel = new JPanel();        patternPanel.setLayout(new BoxLayout(patternPanel, BoxLayout.Y_AXIS));        patternPanel.add(patternLabel1);        patternPanel.add(patternLabel2);        patternPanel.add(patternList);            JPanel localePanel = new JPanel();        localePanel.setLayout(new BoxLayout(localePanel, BoxLayout.Y_AXIS));        localePanel.add(localeLabel);        localePanel.add(localeList);            JPanel resultPanel = new JPanel();        resultPanel.setLayout(new GridLayout(0, 1));        resultPanel.add(resultLabel);        resultPanel.add(result);            setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));        patternPanel.setAlignmentX(Component.CENTER_ALIGNMENT);        localePanel.setAlignmentX(Component.CENTER_ALIGNMENT);        resultPanel.setAlignmentX(Component.CENTER_ALIGNMENT);            add(patternPanel);        add(Box.createVerticalStrut(10));        add(localePanel);        add(Box.createVerticalStrut(10));        add(resultPanel);            setBorder(BorderFactory.createEmptyBorder(10,10,10,10));         reformat();       } // constructor    /** Listens to the pattern combo box. */    class PatternListener implements ActionListener {         public void actionPerformed(ActionEvent e) {        JComboBox cb = (JComboBox)e.getSource();        String newSelection = (String)cb.getSelectedItem();        currentPattern = newSelection;        reformat();        }    }    /** Listens to the locale combo box. */    class LocaleListener implements ActionListener {         public void actionPerformed(ActionEvent e) {        JComboBox cb = (JComboBox)e.getSource();        int index = cb.getSelectedIndex();        availableLocales.setCurrent(index);        reformat();        }    }    /** Manages information about locales for this application. */    class LocaleGroup {        Locale currentLocale;        Locale[] supportedLocales = {           Locale.US,            Locale.GERMANY,            Locale.FRANCE           // Add other locales here, if desired.        };        public LocaleGroup() {           currentLocale = supportedLocales[0];           }         public void setCurrent(int index) {           currentLocale = supportedLocales[index];        }        public Locale getCurrent() {           return currentLocale;        }        public String[] getStrings() {           String[] localeNames = new String[supportedLocales.length];           for (int k = 0; k < supportedLocales.length; k++) {              localeNames[k] = supportedLocales[k].getDisplayName();           }           return localeNames;        }    }    /** Formats and displays today's date. */    public void reformat() {         SimpleDateFormat formatter =             new SimpleDateFormat(currentPattern,                                  availableLocales.getCurrent());         try {             String dateString = formatter.format(today);             result.setForeground(Color.black);             result.setText(dateString);         }         catch (IllegalArgumentException iae) {             result.setForeground(Color.red);             result.setText("Error: " + iae.getMessage());         }    }    public static void main(String s[]) {         WindowListener l = new WindowAdapter() {             public void windowClosing(WindowEvent e) {System.exit(0);}         };          frame = new JFrame("Date Formatting Demo");         frame.addWindowListener(l);         frame.getContentPane().add("Center", new SimpleDateFormatDemo());         frame.pack();         frame.setVisible(true);    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产欧美日美国产精品| 国产一区二三区| 国产精品乱人伦中文| 精品国产91洋老外米糕| 日韩精品一区二区三区中文精品| 欧美一区二区三区四区视频| 7777精品伊人久久久大香线蕉经典版下载| 欧美日韩精品电影| 在线综合视频播放| 精品毛片乱码1区2区3区| 精品国产百合女同互慰| 国产三级精品在线| 国产欧美一区二区三区沐欲| 国产精品国产精品国产专区不片| 国产精品不卡一区二区三区| 一区二区视频免费在线观看| 亚洲一二三四区| 毛片不卡一区二区| 成人综合婷婷国产精品久久蜜臀| 成人午夜电影小说| 欧美专区在线观看一区| 91精品国产综合久久国产大片| 精品国产成人系列| 国产视频亚洲色图| 一区二区三区中文在线| 三级不卡在线观看| 国产美女视频一区| 欧美伊人久久大香线蕉综合69| 欧美日韩高清一区| 国产网站一区二区| 亚洲国产日韩一级| 国内欧美视频一区二区| 一本大道久久a久久精二百| 91精品欧美综合在线观看最新| 久久人人97超碰com| 日韩一区二区精品| 欧美日韩成人激情| 粉嫩aⅴ一区二区三区四区| 亚洲国产日韩a在线播放| 国产亚洲成年网址在线观看| 欧美亚洲图片小说| 国产宾馆实践打屁股91| 天堂一区二区在线| 亚洲欧美日韩国产手机在线| 欧美本精品男人aⅴ天堂| 99久久夜色精品国产网站| 欧美性猛片xxxx免费看久爱| 国产传媒日韩欧美成人| 欧美精品日韩综合在线| 成人中文字幕电影| 日本伊人色综合网| 亚洲午夜一二三区视频| 国产精品乱码人人做人人爱| 日韩小视频在线观看专区| 色噜噜夜夜夜综合网| 国产精品1024久久| 欧美一级片在线| 亚洲一二三专区| 99久久免费视频.com| 国产亚洲制服色| 老司机精品视频线观看86 | 欧美日韩高清在线| 国产精品久久久久影视| 国产在线不卡一卡二卡三卡四卡| 精品视频一区二区三区免费| 亚洲日本va午夜在线影院| 精品无人码麻豆乱码1区2区 | 色老汉av一区二区三区| 欧美国产精品中文字幕| 国产精品一区二区三区四区| 91麻豆精品国产无毒不卡在线观看| 亚洲卡通动漫在线| 91色.com| 一区二区三区在线视频播放 | 一区二区三区四区乱视频| 97久久精品人人爽人人爽蜜臀| 久久久久久黄色| 国产传媒欧美日韩成人| 国产日产欧产精品推荐色| 国产精品中文字幕日韩精品 | 欧美自拍丝袜亚洲| 亚洲成人动漫在线免费观看| 日本道精品一区二区三区| 亚洲一区二区三区四区的| 色综合天天综合色综合av| 亚洲精品日韩一| 在线观看av一区二区| 亚洲福利国产精品| 日韩一区二区不卡| 国产精品自拍网站| 欧美激情一区二区三区全黄| 色综合婷婷久久| 午夜精品久久一牛影视| 日韩免费高清av| 国产成人综合在线观看| 亚洲视频图片小说| 7799精品视频| 国产精品一区二区男女羞羞无遮挡| 欧美经典一区二区三区| 91国偷自产一区二区三区成为亚洲经典 | 成人av网站大全| 亚洲午夜久久久| 精品国产91洋老外米糕| 成人激情开心网| 日韩电影在线一区二区| 国产亚洲欧洲一区高清在线观看| 99re亚洲国产精品| 日韩高清不卡一区二区三区| 国产蜜臀97一区二区三区| 欧美伊人久久大香线蕉综合69 | 91影视在线播放| 日本伊人精品一区二区三区观看方式| 久久综合狠狠综合久久激情 | 天堂成人免费av电影一区| 精品国产123| 在线观看欧美精品| 国产精品伊人色| 午夜精品福利一区二区蜜股av | 欧美疯狂性受xxxxx喷水图片| 激情欧美日韩一区二区| 最新不卡av在线| 久久影音资源网| 欧美日韩精品一区二区三区| 成人涩涩免费视频| 毛片一区二区三区| 亚洲成人自拍网| 亚洲私人黄色宅男| 久久亚洲精品国产精品紫薇| 精品视频全国免费看| www.日韩av| 国产原创一区二区| 午夜国产不卡在线观看视频| 1024国产精品| 国产女主播一区| 日韩视频中午一区| 欧洲av在线精品| jiyouzz国产精品久久| 精品一区二区三区香蕉蜜桃| 日日夜夜精品视频免费| 亚洲男人电影天堂| 亚洲视频一区二区免费在线观看 | 国产成人av电影在线| 美女视频黄免费的久久| 天天影视涩香欲综合网| 亚洲成人av一区二区三区| 亚洲精品国产视频| 亚洲蜜桃精久久久久久久| 国产视频一区二区在线| 久久久精品免费免费| 2019国产精品| 国产丝袜欧美中文另类| 国产欧美精品日韩区二区麻豆天美| 精品国产乱码久久久久久免费 | 亚洲精品日韩专区silk| 亚洲欧美一区二区三区久本道91 | 成人免费高清在线| 国产成人精品免费| 成人黄页在线观看| 波波电影院一区二区三区| 成人免费视频caoporn| www.日韩大片| 欧美亚洲国产bt| 欧美喷水一区二区| 欧美一激情一区二区三区| 日韩久久久久久| 欧美刺激脚交jootjob| 久久综合九色综合久久久精品综合| 欧美tickling网站挠脚心| 久久久久久97三级| 最新热久久免费视频| 一区二区三区美女| 日韩制服丝袜av| 久久精品国产澳门| 国产成人av影院| 色婷婷激情综合| 欧美高清视频在线高清观看mv色露露十八| 精品1区2区3区| 精品国产精品网麻豆系列| 中文字幕免费观看一区| 亚洲最大色网站| 久久er精品视频| 99久久国产综合精品色伊| 欧美曰成人黄网| 精品国产成人在线影院| 亚洲少妇中出一区| 日韩国产精品91| 成人禁用看黄a在线| 欧美日韩大陆在线| 久久久九九九九| 亚洲动漫第一页| 国产精品综合一区二区| 欧美图片一区二区三区| 欧美精品一区男女天堂| 亚洲自拍另类综合| 国产在线麻豆精品观看| 91久久精品网| 国产精品色婷婷久久58| 男女男精品视频网| 在线观看网站黄不卡| 久久久精品欧美丰满|