FileDocCategorySizeDatePackage
ScrollList.javaAPI DocExample848Thu Oct 24 20:14:24 BST 2002None

ScrollList

public class ScrollList extends JFrame

Fields Summary
JScrollPane
scrollpane
Constructors Summary
public ScrollList()

    super("JScrollPane Demonstration");
    setSize(300, 200);
    setDefaultCloseOperation(EXIT_ON_CLOSE);

    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);