Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

java Worksheet Nine: Graphical User Interface GUI/part 1 You receive the files Example1.java Compile and run the above program. Modify the application such that: a)

java
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Worksheet Nine: Graphical User Interface GUI/part 1 You receive the files Example1.java Compile and run the above program. Modify the application such that: a) the counter can be incremented and decremented: To do so: - You should increase the size of the frame to 300,100. - You need to add the new button "decrement". - In addition, you need to add an action listener for the new button so that the counter can be decremented. b) Modify the program above to include the multiply () by 3 and division (/) by 3 operations. To do so: - you should increase the size of the frame to 400,200 - you need to add the new button "multiply by 3 " - you need to add the new button "division by 3" - In addition, you need to add an action listener for the new buttons so that the counter can be multiplied by 3 and devised by 3 . c) Modify the program above to read the values of counter from the user. To do so: - you need to add the new TextField "Counter" - You need to read the value on the text field "Counter" and saves them in the counter. Task 2: Implement an application consisting of 1 label, 16 buttons and 1 Textfield. a) When the user clicks on the any buttons the class concatenates the value on the text field to the value on the Button label. b) When the user clicks on the button labeled "H", the class shows message box with(" Dialing") Text. Task 3: Implement an application consisting of two labels and two buttons. The labels display either you Course Name or the text "IAVA" or the Course Code or the text "CS212" respectively. Pressing a button switches between displaying the name and displaying the general text of the label next to the text: To get this tabular layout, set the layout of your panel to a grid layout: panel.setlayout(new Gridlayout(2,2)); Task\#2 (converts US dollars into Canadian dollars) Write a program that converts US dollars into Canadian dollars, as shown in the following figure. The program let the user enter an amount in US dollars and display it equivalent value in Canadian dollars when clicking the Convert button. One dollar is 1.5 Canadian dollars. Home Work:- add another Button at the center of bottom panel Named Clear. Clear Button clears the text fields and prepare the Converter system to new operation. Task\#1 (simple user form with actions) The user interface looks and behaves in the following way: - The application has six String values: - three constants that save the initial values of the first name, the name and the country. - three strings that save the values of the first name, the name and the country. - The text in the JTextField fields can be modified. - After pushing the save button the text of the JTextField fields is read and saved in the three strings. - After pushing the cancel button, the text in the JTextField fields is replaced by the values in the saved strings. (not the initial values!) - After pushing the printbutton the text in the JTextField fields is saved to the strings and printed on the Terminal window of BlueJ (System.out.printlin())

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

Database Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

More Books

Students also viewed these Databases questions

Question

Define Administration?

Answered: 1 week ago