import java.awt.*;
import javax.swing.*;
public class list extends JApplet
{
public void init(){
String str[] = {"1","2","3","4","5","6","7"};
JComboBox box = new JComboBox(str);
box.setMaximumRowCount(4); //最多显示4列
setLayout(null);
box.setBounds(10,10,100,30);
getContentPane().add(box,BorderLayout.NORTH);
}
}
import javax.swing.*;
public class list extends JApplet
{
public void init(){
String str[] = {"1","2","3","4","5","6","7"};
JComboBox box = new JComboBox(str);
box.setMaximumRowCount(4); //最多显示4列
setLayout(null);
box.setBounds(10,10,100,30);
getContentPane().add(box,BorderLayout.NORTH);
}
}