import java.awt.*;
import javax.swing.*;
import java.awt.event.*;public class JFrameChating extends JFrame{
public static void main(String[] args) {
new JFrameChating();
}

public JFrameChating(){
super("聊天室");

/*JTextArea jta1 = new JTextArea(50,10);
JTextArea jta2 = new JTextArea(5,35);

JScrollPane jsp1 = new JScrollPane(jta1);
JScrollPane jsp2 = new JScrollPane(jta2);*/

JPanel jp1 = new JPanel();//左半部分
JPanel jp2 = new JPanel();
JPanel jp4 = new JPanel();//左上角大的部分包括聊天对象选择部分
JPanel jp5 = new JPanel();//左下角部分
JPanel jp6 = new JPanel();
JPanel jp7 = new JPanel();
jp1.setLayout(new BorderLayout());
jp2.setBackground(Color.blue);
jp5.setLayout(new BorderLayout());
jp6.setBackground(Color.green);

JSplitPane splitter1 = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,jp1,jp2);
JSplitPane splitter2 = new JSplitPane(JSplitPane.VERTICAL_SPLIT,jp4,jp5);
JSplitPane splitter3 = new JSplitPane(JSplitPane.VERTICAL_SPLIT,jp6,jp7);

this.add(splitter1);
jp1.add(splitter2);
jp5.add(splitter3);

this.setBounds(300,100,700,500);
this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
this.setVisible(true);

splitter1.setDividerLocation(0.75);
splitter2.setDividerLocation(0.62);
splitter3.setDividerLocation(0.50);
}
}