本帖最后由 yinxiaoqi 于 2011-05-17 20:36:02 编辑

解决方案 »

  1.   

    用两个JSplitPane: JSplitPane的右侧中放置另一个JSplitPane
      

  2.   


    JSplitPane jp = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT ,new JLabel("上"),new JLabel("下"));
    JSplitPane  tpsplit = new JSplitPane(JSplitPane.VERTICAL_SPLIT,jp ,new JLabel("右")) ;现在就是这样的,我怎么在右测分割呢,上面的操做只直在底下分割了,
      

  3.   

    用JPanel 。一个大的面板,含两个面板(用流线型布局),右边的面板含两个面板(用BorderLayout布局)
      

  4.   


    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JSplitPane;
    public class MainFrame extends JFrame {
    public MainFrame() {
    JSplitPane jsp1 = new JSplitPane();
    jsp1.setLeftComponent(new JLabel("第一个JSplitPane的左边"));
    JSplitPane jsp2 = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
    jsp2.setLeftComponent(new JLabel("第二个JSplitPane的上边"));
    jsp2.setRightComponent(new JLabel("第二个JSplitPane的下边"));
    jsp1.setRightComponent(jsp2);
    this.add(jsp1);
    this.setTitle("JSplitPane示例");
    this.setSize(800, 600);
    this.setVisible(true);
    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }

    public static void main(String[] args) {
    new MainFrame();
    }
    }简单的来个例子,楼主参考!
      

  5.   

    可以用多个JSplitPane嵌套来实现啊。比如:要实现三列的。inner=new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, new JLabel("a"), new JLabel("b"));
    outer=new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, inner, new JLabel("c"));
    效果是:   a | b | c类似于用JPanel一样,多嵌套一下就可以啦
      

  6.   


    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;public class SplitPaneFrame extends JFrame 
    {
    private JButton btnLeft = new JButton("左边");
    private JButton btnRightTop = new JButton("右上");
    private JButton btnRightBottom = new JButton("右下");

    public SplitPaneFrame()
    {
    JSplitPane rightPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, 
    btnRightTop,
    btnRightBottom);
    JSplitPane pane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,
    btnLeft,
    rightPane);
    add(pane);
    }

    public static void main(String[] args)
    {
    JFrame frame = new SplitPaneFrame();
    frame.setVisible(true);
    frame.pack();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }
    }