1. Each of the following questions asks you to collect some type of data or provide some type of operation to the user. For each question, select the most appropriate widget to use. You should select each answer from the following list of widgets:

    1. ________________ You want the user to enter a credit card number

    2. ________________ You want the user to select a university status from the choices of Professor, Student, Administrator, and Secretary. A user is allowed to select multiple status's.

    3. ________________ You want the user to select a color chip from a group of 10 color chips. Only one color should be selectable at a time. The color chips should be visible at all times on the display.

    4. ________________ You want the user to select their county of residence in Tennessee

    5. ________________ You want the user to enter the volume of a speaker that should range between 0 and 20 (the user can select 0, 1, 2, ..., 20).

  2. Using the NetBeans IDE, write a Java Swing application that displays a slider, two buttons, an increment button and a decrement button, and a label that represents the value of the slider. The increment and decrement buttons should increment and decrement the value of the slider by 1. The slider should range in value from 0-200 with a default value of 100.

    You should place the widgets using a BorderLayout manager. You should place the decrement button in the west (left) region of the display, the slider in the center region, the increment button in the east (right) region, and the value label in the north region.

    If the user presses the increment button and the value is already at the maximum allowable value for the slider then the application should pop up a message dialog indicating that the value cannot be further incremented. A similar message should be displayed if the user attempts to decrement the value when it is already at its minimum value.

    If you have questions about how your interface should look or behave, you can copy the file /home/bvz/cs365/hw/hw8/SliderApp.jar to your home file system and then run it using the command:

    java -jar SliderApp 
    
    I created my SliderApp by hand so it might look slightly different than yours, but the functionality and general appearance should be the same.


Submission Instructions

  1. Place your answers to question 1 in a file named hw8.txt or hw8.pdf.
  2. Use NetBean's "Build" command to create a jar file with your application. NetBeans will put the jar file in a directory named dist. Regardless of what NetBeans names this file, rename it to be "SliderApp.jar" and include SliderApp.jar in your submission.
  3. You may find that dist contains a directory named lib If your dist directory contains a directory named lib, include the lib directory in your submission.
  4. NetBeans will create a src directory with all your .java files. Include the src directory in your submission.

Submit everything using 365_submit. The only jar file should be SliderApp.jar. Do not jar up anything else.