import javax.swing.event.*;
import java.awt.*;
import javax.swing.*;
class solve extends JFrame {
static JFrame f;
static JTextArea t1, t2, t3, t4;
public static void main(String[] args)
{
f = new JFrame("frame");
solve s = new solve();
JPanel p1 = new JPanel();
JPanel p = new JPanel();
JPanel p2 = new JPanel();
JPanel p3 = new JPanel();
t1 = new JTextArea(10, 10);
t2 = new JTextArea(10, 10);
t3 = new JTextArea(10, 10);
t4 = new JTextArea(10, 10);
t1.setText("this is first text area");
t2.setText("this is second text area");
t3.setText("this is third text area");
t4.setText("this is fourth text area");
p1.add(t1);
p.add(t2);
p2.add(t3);
p3.add(t4);
JSplitPane sl = new JSplitPane(SwingConstants.VERTICAL, p1, p);
JSplitPane s2 = new JSplitPane(SwingConstants.VERTICAL, p2, p3);
sl.setOrientation(SwingConstants.VERTICAL);
s2.setOrientation(SwingConstants.VERTICAL);
s2.setOneTouchExpandable(true);
sl.setDividerLocation(70);
f.setLayout(new FlowLayout());
f.add(sl);
f.add(s2);
f.setSize(600, 300);
f.show();
}
}