import java.util.*;
import javax.swing.*;
import javax.swing.tree.*;
import java.awt.*;

public class SplitSample extends JPanel {

  public SplitSample() {
	super();	

	JSplitPane pane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);

	TreeSample tree = new TreeSample();
	ScrollSample text = new ScrollSample();

	pane.setLeftComponent(tree);
	pane.setRightComponent(text);
  	pane.setDividerLocation(150);
	pane.setDividerSize(10);	
	
        //Lay out the content pane.
        setPreferredSize(new Dimension(350, 300));

	setLayout(new GridLayout(1,1));
	add(pane, new Dimension(1,1));

   }
   public static void main (String args[]) {
	SplitSample app = new SplitSample();
	JFrame frame = new JFrame ("My Application");
	frame.setContentPane(app);
	frame.pack();
	frame.show();
   }
}


         
