📄 jsplitp1.java~1~
字号:
import java.awt.*;import java.awt.event.*;import java.applet.*;import javax.swing.*;import java.awt.event.*;public class JSplitP1 extends JApplet { JPanel cp=new JPanel(); JScrollPane jsp=new JScrollPane(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); JLabel ImagL=new JLabel(); JTextArea ta=new JTextArea(); JSplitPane js=new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); public JSplitP1() { ImageIcon icon=new ImageIcon("castle.jpg"); ImagL.setIcon(icon); jsp.setViewportView(ImagL); js.setBorder(BorderFactory.createEtchedBorder()); js.setOneTouchExpandable(true); js.setDividerLocation(100); js.setDividerSize(20); js.setLeftComponent(ta); js.setRightComponent(jsp); cp=(JPanel)this.getContentPane(); cp.add(js); }//Initialize the applet public void init() { this.setSize(new Dimension(300,300)); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -