The increment and decrement buttons should increment and decrement the value of the slider by the increment value. The program should use the Integer class's parseInt method to convert the command line arguments to integers and it should use a try/catch block to catch a NumberFormatException if any of the four arguments cannot be converted to an integer. Your program should print an appropriate error to the console and then exit.
You should position the two views using a BorderLayout manager. Place the text view in the north (top) region and the slider view in the center region. The slider view will have to be placed in its own JPanel. I want the elements of the slider view to be laid out horizontally, in the order decrement button, slider, and increment button. There are at least three layout managers that I can think of which will position these three elements correctly, so I will leave it up to you to choose one.
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 (use the JOptionPane's showMessageDialog method). A similar message should be displayed if the user attempts to decrement the value when it is already at its minimum value. If the user attempts to increment the value and the increment would move the value past its maximum permissable value, then increase the value to the maximum value, but do not print an error message. Do the same thing for the decrement button.
If you have questions about how your interface should look or behave, you can copy the file /home/bvz/cs365/hw/hw7/SliderApp.jar to your home file system and then run it using the command:
java -jar SliderApp.jar minValue maxValue startValue incrementValueYou do not have to get the spacing between elements exactly like mine, but I do want the general positions to be the same, and I want the text view centered.
For this assignment you can put everything into one class. It's probably easiest to make your class subclass a JFrame. You will need to create two JPanel's, one to hold the text view and one to hold the slider view.
java -jar SliderApp.jar minValue maxValue startValue incrementValue