demosplitpaneframe.java
来自「java绘图 java awt 经典绘图的例子,对于初学awt模块的人非常有帮助」· Java 代码 · 共 37 行
JAVA
37 行
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package swing;import javax.swing.JButton;import javax.swing.JFrame;import javax.swing.JSplitPane;/** * * @author zhaolin */public class DemoSplitPaneFrame extends JFrame{ public DemoSplitPaneFrame(){ JSplitPane jsp1 = new JSplitPane(JSplitPane.VERTICAL_SPLIT); JSplitPane jsp2 = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); JSplitPane jsp3 = new JSplitPane(JSplitPane.VERTICAL_SPLIT); jsp1.add(new JButton("Button1"),JSplitPane.BOTTOM); jsp1.add(jsp2,JSplitPane.TOP); jsp2.add(new JButton("Button2"),JSplitPane.RIGHT); jsp2.add(jsp3,JSplitPane.LEFT); jsp3.add(new JButton("Button3"),JSplitPane.TOP); jsp3.add(new JButton("Button4"),JSplitPane.BOTTOM); this.getContentPane().add(jsp1); this.pack(); this.setVisible(true); } public static void main(String[] args) { new DemoSplitPaneFrame(); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?