This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: rating. Add the pictures using the JLabel component (section 12.10), being careful to add empty labels where necessary. Choose any items and picture you wish (available formats are listed in section 12.10). The following is an example of screens based on ratings from movies.aol.com (do not use this): 2. Write a program that displays a picture chosen by the user. Use a JTextField for the file name, a JButton to generate an event, and a JLabel to display either the picture or a message if the file does not exist (see section 8.8 and associated lectures). Use a FlowLayout so as not to restrict the image size (see section 12.5.1). Display the message “No image” in the label when the program begins. The exact arrangement of the components is not important and may vary depending on the image size. The following screen shots show the initial window appearance and two possible results after the user has entered a file name and clicked the “Open” button....
View Full Document
- Spring '07
- user input, Graphical User Interfaces, input dialogs