i want to add a vertical scrollpane...did somebody know how this is possible...in my code i have add a scrollpane but it displays only horizontal...and i want it vertical
please see the code...
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
class SwingWithMe
{
public static void main(
String args[])
{
JTextField[] myTextField=new JTextField[30];
JPanel myPanel=new JPanel();
JFrame myFrame=new JFrame("Test");
JScrollPane myPane= new JScrollPane();
for(int i=0;i<30;i++)
{
myTextField[i]=new JTextField(10);
myPanel.add(myTextField[i]);
}
myPane=new JScrollPane(myPanel);
myFrame.getContentPane().add(myPane,BorderLayout.CENTER);
myFrame.setResizable(false);
myFrame.setLocation(0,100);
myFrame.setSize(1030,500);
myFrame.setVisible(true);
}
}
please help as soon as possible...
vikas
[This message has been edited by vikas de (edited March 30, 2001).]