⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wordfinder.java

📁 一本有关Java图形界面设计的一本书,英文的,附带有源码,
💻 JAVA
字号:
import javax.swing.*;import java.awt.*;import java.awt.event.*;import java.net.*;import java.io.*;import java.util.*;import java.util.List; // we don't want java.awt.List/** * WordFinder is an interface for searching a word list. * When the user types any part of a word, the interface * displays all the words that match. */public class WordFinder extends JFrame {    private WordList words = new WordList();        /**     * Make a WordFinder window.     */    public WordFinder() {        super("Word Finder");                // call System.exit() when user closes the window        setDefaultCloseOperation(EXIT_ON_CLOSE);    }        /**     * Main method.  Makes and displays a WordFinder window.     * @param args Command-line arguments.  Ignored.     */    public static void main(String[] args) {        // In general, Swing objects should only be accessed from        // the event-handling thread -- not from the main thread        // or other threads you create yourself.  SwingUtilities.invokeLater()        // is a standard idiom for switching to the event-handling thread.        SwingUtilities.invokeLater(new Runnable() {            public void run () {                // Make and display the WordFinder window.                new WordFinder().show();            }        });    }    }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -