Chat with us, powered by LiveChat Creating a Class in Java with GUI controls | Writedemy

Creating a Class in Java with GUI controls

Creating a Class in Java with GUI controls

uestion

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).

Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

Do you need an answer to this or any other questions?

About Writedemy

We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.

How It Works

To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Are there Discounts?

All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.

Hire a tutor today CLICK HERE to make your first order