Creating a Class in Java with GUI controls

Question # 00003902 Posted By: guinness13494 Updated on: 11/22/2013 02:15 PM Due on: 11/24/2013
Subject Computer Science Topic Object-Oriented Programming Tutorials:
Question
Dot Image
Create a class, Time.java, with the following GUI controls:

- 3 drop-down lists. 
 list 1 will contain month names (January - December)
 list 2 will contain day numbers (1 -31)
 list 3 will contain year numbers (1900-2100)

- 3 labels ("Month", "Day", "Year") that will be placed before the 
corresponding drop-down list

- 1 noneditable text field

- 5 buttons titled "Set Date", "Increase Day", "Decrease Day", "Increase 
Second", "Decrease Second"

This classes no argument constructor will create a DateAndTime object from 
assignment #5 and the GUI controls listed above. Additionally, it will have 
button handlers for each button:

- If the Set Date button is clicked, you should read the selections from the 
month, day and year drop down lists and pass their values as parameters 
to DateAndTime's setDate method. If the parameters are valid and setDate returns
true you should display the result of DateAndTime's toString() method in the 
text field. Otherwise, you should display the message "Invalid Date" in the 
text field. 

- If the Increase Day or Decrease Day buttons are clicked, you should call 
DateAndTime's increaseDay() or decreaseDay() methods and display the result of 
DateAndTime's toString() method in the text field. 

- If the Increase Second or Decrease Second buttons are clicked, you should 
call DateAndTime's increaseSecond() or decreaseSecond() methods and display the 
result of DateAndTime's toString() method in the text field. 


Use the flow layout manager to arrange your controls. Each drop-down list and 
its corresponding label should be on a separate line, the text field on a 
separate line, and the buttons arranged at the bottom in one or two rows.

As usual, include general comments, comment each variable and method, and 
format your code neatly. You should not make any changes to the TimeType or 
DateAndTime classes from assignments 4 and 5.

 Create your own (small) test client to test Time.java (and it's supporting classes).
Dot Image
Tutorials for this Question
  1. Tutorial # 00003848 Posted By: neil2103 Posted on: 11/25/2013 10:14 AM
    Puchased By: 3
    Tutorial Preview
    The solution of Java with GUI controls...
    Attachments
    full_java_app.zip (126.66 KB)
    Recent Feedback
    Rated By Feedback Comments Rated On
    gui...3494 Rating Great saviour during assignment submission 12/25/2013
  2. Tutorial # 00004251 Posted By: neil2103 Posted on: 12/03/2013 11:29 AM
    Puchased By: 3
    Tutorial Preview
    The solution of Class in Java with GUI controls fial...
    Attachments
    time_final.zip (125.65 KB)
    Recent Feedback
    Rated By Feedback Comments Rated On
    gui...3494 Rating Easy tutorial order placing 01/03/2014

Great! We have found the solution of this question!

Whatsapp Lisa