Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Examine the code and figure out how to add another button to the GUI. Have this button double the number that the user enters. You

Examine the code and figure out how to add another button to the GUI. Have this button double the number that the user enters. You will have to modify code in multiple files to accomplish this.

Add a fourth button, name it, and wire It to accomplish that function.

Paste a screen shot of your four-action GUI with the correct result from one of your buttons.

**********Java File**********************************************************************

/* Simple Math Operations Using Buttons

*/

import java.net.URL;

import javafx.application.Application;

import javafx.fxml.FXMLLoader;

import javafx.scene.layout.VBox;

import javafx.scene.Scene;

import javafx.stage.Stage;

public class SimpleMathPractice extends Application

{

@Override

public void start( Stage stage ) // throws Exception

{

try

{

URL url =

getClass( ).getResource( "fxml_simple_math.fxml" );

VBox root = FXMLLoader.load( url );

Scene scene = new Scene( root, 300, 275 );

scene.getStylesheets( ).add( "simple_math.css" );

stage.setTitle( "Simple Math" );

stage.setScene( scene );

stage.show( );

}

catch ( Exception e )

{

e.printStackTrace( );

}

}

public static void main( String [] args )

{

launch( args );

}

}

**********************Fxml File*************************************

"1.0" encoding="UTF-8"?>

"SimpleMathController"

xmlns:fx="http://javafx.com/fxml"

alignment="center" spacing="10" >

"operand" maxWidth="100" />

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 And Expert Systems Applications 24th International Conference Dexa 2013 Prague Czech Republic August 2013 Proceedings Part 1 Lncs 8055

Authors: Hendrik Decker ,Lenka Lhotska ,Sebastian Link ,Josef Basl ,A Min Tjoa

2013 Edition

3642402844, 978-3642402845

Students also viewed these Databases questions

Question

10:16 AM Sun Jan 29 Answered: 1 week ago

Answered: 1 week ago

Question

5. Discuss the role of the Web in career management.

Answered: 1 week ago

Question

4. Design a career management system.

Answered: 1 week ago

Question

4. Evaluation is ongoing and used to improve the system.

Answered: 1 week ago