Java Applets: Interactive Programming

Lab/Assignments


The purpose of this assignment is


Instructions:

You need to write a Java program that produces a GUI that represents a library things.


Note the number of items in the list and drop-down box.

  • The GUI has the following information:
    1. The title ("Sugar's Library") -- change it to your name
    2. Label for Photo Albums   (JLabel)
    3. at least 7 items in the list (multi-select)   (JList)
    4. Label for Books   (JLabel)
    5. 4 books in the drop-down list   (JComboBox)
    6. Label for Albums   (JLabel)
    7. 6 music albums in the drop-down list   (JComboBox)
    8. Label for DVDs   (JLabel)
    9. 5 DVDs in the drop-down list   (JComboBox)

    10. Label for Location   (JLabel)
    11. 3 radio buttons for locations   (JRadioButton and ButtonGroup)
    12. favorite quote   (JTextArea)
      You must have the text shown on multiple lines (use \n)
    13. To Do Label   (JLabel)
    14. 3 To Do checkboxes   (JCheckbox)

  • For this assignment, the items above merely need to appear on the GUI, the buttons don't need to do anything.
    A later assignment will implement the Components so that the user can interact with it.

  • Be aware that the layout of the GUI is an important part of this assignment.
    It should look very close to what I have here.

  • Be sure to change the width and height dimensions of the applet to 750 by 300
  • To get you started, here's an outline for your Library.java file.
    You don't have to use this, but if you need help getting started, this might help.
    If you do NOT use this outline, make sure you have several methods in your program (e.g., you should not have all your code stuffed into the init() method)

  • You MUST use BorderLayout, GridLayout, and FlowLayout.
    You may NOT use GridBagLayout or any other layout managers for this assignment.
    i.e., I want you to understand these layouts specifically
  • The size of the text of the title should match closely to mine.
  • If you stretch out the Applet, the textArea should grow as well.


    Copyright © 2006-2007: E.S.Boese All rights reserved.