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

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

?? textareademo.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 components;/* * TextAreaDemo.java requires no other files. */import javax.swing.*;import java.util.*;import javax.swing.event.DocumentEvent;import javax.swing.event.DocumentListener;import java.awt.event.ActionEvent;import javax.swing.text.BadLocationException;import javax.swing.GroupLayout.*;public class TextAreaDemo extends JFrame        implements DocumentListener {        private JLabel jLabel1;    private JScrollPane jScrollPane1;    private JTextArea textArea;        private static final String COMMIT_ACTION = "commit";    private static enum Mode { INSERT, COMPLETION };    private final List<String> words;    private Mode mode = Mode.INSERT;                public TextAreaDemo() {        super("TextAreaDemo");        initComponents();                textArea.getDocument().addDocumentListener(this);                InputMap im = textArea.getInputMap();        ActionMap am = textArea.getActionMap();        im.put(KeyStroke.getKeyStroke("ENTER"), COMMIT_ACTION);        am.put(COMMIT_ACTION, new CommitAction());                words = new ArrayList<String>(5);        words.add("spark");        words.add("special");        words.add("spectacles");        words.add("spectacular");        words.add("swing");    }            private void initComponents() {        jLabel1 = new JLabel("Try typing 'spectacular' or 'Swing'...");                textArea = new JTextArea();        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);        textArea.setColumns(20);        textArea.setLineWrap(true);        textArea.setRows(5);        textArea.setWrapStyleWord(true);                jScrollPane1 = new JScrollPane(textArea);                GroupLayout layout = new GroupLayout(getContentPane());        getContentPane().setLayout(layout);                //Create a parallel group for the horizontal axis        ParallelGroup hGroup = layout.createParallelGroup(GroupLayout.Alignment.LEADING);        //Create a sequential and a parallel groups	SequentialGroup h1 = layout.createSequentialGroup();        ParallelGroup h2 = layout.createParallelGroup(GroupLayout.Alignment.TRAILING);        //Add a scroll panel and a label to the parallel group h2	h2.addComponent(jScrollPane1, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE);        h2.addComponent(jLabel1, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE);        	//Add a container gap to the sequential group h1	h1.addContainerGap();        // Add the group h2 to the group h1	h1.addGroup(h2);        h1.addContainerGap();        //Add the group h1 to hGroup	hGroup.addGroup(Alignment.TRAILING,h1);        //Create the horizontal group	layout.setHorizontalGroup(hGroup);        	//Create a parallel group for the vertical axis        ParallelGroup vGroup = layout.createParallelGroup(GroupLayout.Alignment.LEADING);        //Create a sequential group	SequentialGroup v1 = layout.createSequentialGroup();        //Add a container gap to the sequential group v1	v1.addContainerGap();        //Add a label to the sequential group v1	v1.addComponent(jLabel1);        v1.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED);        //Add scroll panel to the sequential group v1	v1.addComponent(jScrollPane1, GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE);        v1.addContainerGap();        //Add the group v1 to vGroup	vGroup.addGroup(v1);        //Create the vertical group	layout.setVerticalGroup(vGroup);        pack();            }    // Listener methods        public void changedUpdate(DocumentEvent ev) {    }        public void removeUpdate(DocumentEvent ev) {    }        public void insertUpdate(DocumentEvent ev) {        if (ev.getLength() != 1) {            return;        }                int pos = ev.getOffset();        String content = null;        try {            content = textArea.getText(0, pos + 1);        } catch (BadLocationException e) {            e.printStackTrace();        }                // Find where the word starts        int w;        for (w = pos; w >= 0; w--) {            if (! Character.isLetter(content.charAt(w))) {                break;            }        }        if (pos - w < 2) {            // Too few chars            return;        }                String prefix = content.substring(w + 1).toLowerCase();        int n = Collections.binarySearch(words, prefix);        if (n < 0 && -n <= words.size()) {            String match = words.get(-n - 1);            if (match.startsWith(prefix)) {                // A completion is found                String completion = match.substring(pos - w);                // We cannot modify Document from within notification,                // so we submit a task that does the change later                SwingUtilities.invokeLater(                        new CompletionTask(completion, pos + 1));            }        } else {            // Nothing found            mode = Mode.INSERT;        }    }        private class CompletionTask implements Runnable {        String completion;        int position;                CompletionTask(String completion, int position) {            this.completion = completion;            this.position = position;        }                public void run() {            textArea.insert(completion, position);            textArea.setCaretPosition(position + completion.length());            textArea.moveCaretPosition(position);            mode = Mode.COMPLETION;        }    }        private class CommitAction extends AbstractAction {        public void actionPerformed(ActionEvent ev) {            if (mode == Mode.COMPLETION) {                int pos = textArea.getSelectionEnd();                textArea.insert(" ", pos);                textArea.setCaretPosition(pos + 1);                mode = Mode.INSERT;            } else {                textArea.replaceSelection("\n");            }        }    }       public static void main(String args[]) {        SwingUtilities.invokeLater(new Runnable() {            public void run() {                //Turn off metal's use of bold fonts                UIManager.put("swing.boldMetal", Boolean.FALSE);                new TextAreaDemo().setVisible(true);            }        });    }        }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色天天综合久久久久综合片| 久久久一区二区| 2021国产精品久久精品| 亚洲精品亚洲人成人网| 久久精品国产亚洲高清剧情介绍| 成人av资源在线观看| 91精品国产综合久久精品| 亚洲欧美自拍偷拍色图| 国产真实乱对白精彩久久| 在线成人免费视频| 亚洲精品欧美二区三区中文字幕| 国产在线视频一区二区| 欧美日韩一级片网站| 亚洲男人的天堂在线aⅴ视频| 国产在线视频一区二区三区| 日韩一区二区三区视频在线| 石原莉奈一区二区三区在线观看| 91在线看国产| 国产精品污污网站在线观看| 黄网站免费久久| 欧美va亚洲va在线观看蝴蝶网| 婷婷亚洲久悠悠色悠在线播放| 一本一本久久a久久精品综合麻豆| 久久久精品2019中文字幕之3| 久久草av在线| 2014亚洲片线观看视频免费| 男女男精品视频| 91精品国产综合久久精品图片| 视频在线观看国产精品| 欧美肥胖老妇做爰| 亚洲mv大片欧洲mv大片精品| 欧美日韩亚洲综合一区二区三区| 亚洲视频香蕉人妖| 欧美亚洲国产一卡| 亚洲国产综合91精品麻豆| 欧美日韩卡一卡二| 免费av成人在线| 精品国产99国产精品| 国产一区二区按摩在线观看| 精品av久久707| 国产成人三级在线观看| 亚洲丝袜另类动漫二区| 色综合色综合色综合色综合色综合| 国产精品福利影院| 欧美性一级生活| 奇米影视7777精品一区二区| 精品精品欲导航| 粉嫩aⅴ一区二区三区四区五区| 国产精品久久久久一区二区三区共| 色综合天天性综合| 亚洲午夜精品在线| 欧美色国产精品| 另类调教123区| 日本一区二区免费在线| 在线观看视频一区二区欧美日韩| 午夜成人在线视频| 久久久久国产成人精品亚洲午夜| 成人国产精品免费网站| 一区二区三区欧美日| 宅男噜噜噜66一区二区66| 狠狠色狠狠色综合| 亚洲日本在线看| 欧美日韩亚洲综合在线 欧美亚洲特黄一级 | 欧美体内she精高潮| 日本不卡一区二区三区| 国产欧美日韩在线观看| 欧美三日本三级三级在线播放| 免费视频最近日韩| 亚洲欧洲日韩女同| 欧美一卡二卡在线| 99久久久国产精品免费蜜臀| 麻豆91精品91久久久的内涵| 中文字幕一区不卡| 777色狠狠一区二区三区| 高清av一区二区| 日韩av在线发布| 亚洲天堂av老司机| 久久精品一区四区| 欧美精品黑人性xxxx| 成人免费观看av| 美女视频一区二区| 一区二区三区丝袜| 国产精品三级在线观看| 日韩一区二区三区视频| 欧美专区日韩专区| 成人ar影院免费观看视频| 蜜臀国产一区二区三区在线播放| 日韩理论片中文av| 欧美国产一区二区在线观看 | 欧美sm美女调教| 在线欧美日韩国产| 成人h版在线观看| 国产乱人伦精品一区二区在线观看 | 亚洲区小说区图片区qvod| 久久无码av三级| 欧美一区二区国产| 欧美美女直播网站| 在线看日本不卡| 91麻豆6部合集magnet| 国产高清久久久| 国产一区二区三区在线看麻豆| 五月婷婷激情综合| 一区二区三区丝袜| 亚洲激情中文1区| 亚洲人午夜精品天堂一二香蕉| 国产日韩欧美高清在线| 26uuu亚洲综合色欧美| 精品日产卡一卡二卡麻豆| 日韩精品最新网址| 日韩三级视频在线观看| 欧美一级久久久| 日韩一区二区三区观看| 正在播放一区二区| 日韩视频在线你懂得| 日韩欧美精品在线视频| 亚洲精品在线三区| www国产亚洲精品久久麻豆| 精品日韩在线一区| 久久精品一区二区三区av| 精品国产乱码久久久久久图片 | 在线视频中文字幕一区二区| 色综合欧美在线视频区| 色噜噜久久综合| 91久久精品一区二区三| 欧美日韩一区二区三区四区| 欧美日韩大陆一区二区| 欧美一区二区三区视频| 欧美精品一区二区三区四区 | 成人免费视频网站在线观看| 成人深夜福利app| 91一区二区在线观看| 色噜噜狠狠成人中文综合| 91福利小视频| 日韩一级欧美一级| 久久久久国产精品麻豆| 亚洲三级电影网站| 日本aⅴ精品一区二区三区| 国产精品中文字幕日韩精品| 成人午夜碰碰视频| 欧美视频三区在线播放| 91精品国产入口在线| 久久欧美一区二区| 亚洲精品中文字幕在线观看| 蜜桃视频在线观看一区| 国产91高潮流白浆在线麻豆| 日本韩国精品一区二区在线观看| 欧美日韩一区二区三区四区五区| 精品国产乱码91久久久久久网站| 国产精品传媒在线| 午夜私人影院久久久久| 粉嫩av一区二区三区粉嫩| 欧美老肥妇做.爰bbww| 国产校园另类小说区| 亚洲成人777| 不卡的av网站| 精品电影一区二区三区| 亚洲精品高清在线| 国产一区二区91| 欧美日韩一区小说| 国产精品成人免费| 麻豆成人久久精品二区三区红| av在线播放一区二区三区| 欧美一级日韩不卡播放免费| 亚洲视频一区二区在线观看| 日本不卡免费在线视频| 色婷婷亚洲婷婷| 国产精品无圣光一区二区| 日韩av在线发布| 欧美在线制服丝袜| 中文字幕av在线一区二区三区| 日韩av不卡在线观看| 91免费视频网| 国产日韩av一区| 免费的成人av| 3d动漫精品啪啪一区二区竹菊| 亚洲婷婷国产精品电影人久久| 久久99国内精品| 欧美绝品在线观看成人午夜影视| 成人欧美一区二区三区| 国产精品一区2区| 日韩三级中文字幕| 午夜伦理一区二区| 在线视频一区二区三区| 最新不卡av在线| gogo大胆日本视频一区| 中文成人av在线| 国产精品996| 久久久久国产精品厨房| 狠狠色狠狠色综合| 久久婷婷国产综合国色天香| 另类欧美日韩国产在线| 日韩午夜精品电影| 免费在线看一区| 欧美一级夜夜爽| 日本成人超碰在线观看| 日韩一区二区高清| 蜜臀av一区二区| 26uuu亚洲综合色欧美 | 国产欧美日韩精品在线| 国产福利电影一区二区三区|