PickImage - public static void main(String args JFrame...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
//******************************************************************** // PickImage.java Authors: Lewis/Loftus // // Solution to Programming Project 9.5 // // Demonstrates the use a split pane, scroll pane and a list. //******************************************************************** / import java.awt.*; import javax.swing.*; i public class PickImage { //----------------------------------------------------------------- // Creates and displays a frame containing a split pane. The // user selects an image name from the list to be displayed. //-----------------------------------------------------------------
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: public static void main (String args) { JFrame frame = new JFrame ("Pick Image"); frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE); JLabel imageLabel = new JLabel(); JScrollPane imagePanel = new JScrollPane(imageLabel); imagePanel.setBackground (Color.white); ListPanel imageList = new ListPanel (imageLabel); JSplitPane sp = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, imageList, imagePanel); sp.setOneTouchExpandable (true); frame.getContentPane().add (sp); frame.pack(); frame.setVisible(true); } }...
View Full Document

This note was uploaded on 05/17/2011 for the course COP 3530 taught by Professor Davis during the Spring '08 term at University of Florida.

Ask a homework question - tutors are online