FileDocCategorySizeDatePackage
ScrollPaneFrame.javaAPI DocExample514Sat Apr 23 22:35:40 BST 2005None

ScrollPaneFrame

public class ScrollPaneFrame extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

    String filename = "Piazza di Spagna.jpg";
    if (args.length > 0)
      filename = args[0];

    JFrame frame = new JFrame("ScrollPaneFrame v1.0");
	JLabel image = new JLabel( new ImageIcon(filename) );
    frame.getContentPane().add( new JScrollPane(image) );

    frame.setSize(300, 300);
	frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
    frame.setVisible(true);