Question: write java code for the following The GUI will have 4 text fields which will be the code and the user will be able to

write java code for the following

write java code for the following The GUI will have 4 text

The GUI will have 4 text fields which will be the code and the user will be able to modify each number in the code by pushing the corresponding up/down buttons.

There should also be an unlock button and an output text field to inform the user the outcome of their unlock attempt. (eg if it was successful it will say success, if is the wrong code, it should tell them to try again).

Feel free to take some creative liberties with the design (eg colors) / layout of the gui (for example the placement of the buttons). Im mainly looking for the action listeners for each of the buttons to work and the unlock button to give a success/fail message if the correct code is entered.

*hints* To get started you can look at the Text Field listener example from the notes. You will need to modify it to handle looking at the contents of the text field and increase / decrease the value based on what value is pushed.

you can use the mod function (%) to make sure you only go between 0-9 but if you have trouble with that thats fine. again, this lab is mainly about the listeners on a GUI.

Unlocker 3 4 Up Up Up Up Down Down Down Down Unlock! Unlock Successful

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!