Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Harness The Power Of Big Data The IBM Big Data Platform

Authors: Paul Zikopoulos, David Corrigan James Giles Thomas Deutsch Krishnan Parasuraman Dirk DeRoos Paul Zikopoulos

1st Edition

0071808183, 9780071808187

More Books

Students also viewed these Databases questions