oldtestmoreinfopanel.java
来自「oraily的Swing hacks code」· Java 代码 · 共 29 行
JAVA
29 行
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 + =
减小字号Ctrl + -
显示快捷键?