FileDocCategorySizeDatePackage
ScrollList.javaAPI DocExample830Mon Nov 09 12:45:48 GMT 1998None

ScrollList

public class ScrollList extends JFrame

Fields Summary
JScrollPane
scrollpane
Constructors Summary
public ScrollList()

    super("JScrollPane Demonstration");
    setSize(300, 200);
    addWindowListener(new BasicWindowMonitor());

    String categories[] = { "Household", "Office", "Extended Family",
                            "Company (US)", "Company (World)", "Team",
                            "Will", "Birthday Card List", "High School",
                            "Country", "Continent", "Planet" };
    JList list = new JList(categories);
    scrollpane = new JScrollPane(list);

    getContentPane().add(scrollpane, BorderLayout.CENTER);
  
Methods Summary
public static voidmain(java.lang.String[] args)

    ScrollList sl = new ScrollList();
    sl.setVisible(true);