not able to add into JSplitPane..
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Container;
import java.awt.GridLayout;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JSplitPane;
import javax.swing.JTextArea;
public class Ctank {
static
String sometext = "This is a simple text to test.....";
public static void main(String args[])
{
JFrame frame = new JFrame();
frame.setVisible(true);
frame.setSize(800,600);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JTextArea jt1 = new JTextArea(sometext);
Cpoint point = new Cpoint();
JSplitPane sp = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, point, jt1);
frame.getContentPane().add(sp, BorderLayout.CENTER);
}
}
i m not able to add components to JSplitPane, here i m trying to add simple a JTextField and one class CPoint (which exteding JPanel), but on the frame, when i m executing the code nothing is visible to me, what wrong i am doing???