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

📄 jsplitp1.java

📁 刘艺编著的java教程的课本习题加例题代码 很有用哦!
💻 JAVA
字号:
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);  }  public void init()  {   this.setSize(new Dimension(300,300));   }}

⌨️ 快捷键说明

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