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

📄 oldtestmoreinfopanel.java

📁 《SWING HACKS》源码 作者: Joshua Marinacci,Chris Adamson 著 徐晔 译 出版: 2007年2月
💻 JAVA
字号:
import javax.swing.*;public class OldTestMoreInfoPanel {    public static void main (String[] args) {        JFrame frame = new JFrame();        JLabel label =            new JLabel ("This is a simple JLabel as the basic contents");        JTextArea area =            new JTextArea ("These are the contents of the more info " +                            "component.  They're made visible by clicking " +                           "on the little triangle component, which " +                           "catches the event and makes the component " +                           "visible or invisible, based on its previous " +                           "state",                           5, 35);        area.setLineWrap (true);        area.setWrapStyleWord (true);        JScrollPane scroller =            new JScrollPane (area,                             ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,                             ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);        MoreInfoPanel mip = new MoreInfoPanel (label, scroller);        frame.getContentPane().add (mip);        frame.pack();        frame.setVisible(true);    }}

⌨️ 快捷键说明

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