标签:
一、布局
jpanel_LEFT.setLayout(new GridLayout(3,1));
sub1_jpanel.setLayout(new FlowLayout(FlowLayout.LEFT));
二、设置边界名称
sub1_jpanel.setBorder(BorderFactory.createTitledBorder("Fruit"));
三、可见
sub1_jpanel.setVisible(true);
四、JSplitPane
JSplitPane jsplitpane=new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,jpanel_LEFT,jscrollpane_RIGHT);
jsplitpane.setDividerLocation(0.1);
jsplitpane.setDividerSize(3);
//jsplitpane.setBackground(Color.WHITE);
jsplitpane.setResizeWeight(0.1);//设置窗体大小发生改变时,如何分配额外空间
jsplitpane.setOneTouchExpandable(true);
标签:
原文地址:http://www.cnblogs.com/Hblog/p/5504489.html