Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

There are two errors in this program that I can't figure out how to fix. Can someone help?? LatinTranslator.java import javafx.application.Application; import static javafx.application.Application.launch; import

There are two errors in this program that I can't figure out how to fix. Can someone help??

LatinTranslator.java

import javafx.application.Application; import static javafx.application.Application.launch; import javafx.fxml.FXMLLoader;

import javafx.scene.Parent; import javafx.scene.Scene; import javafx.stage.Stage;

/** This is the main application class for the Latin Translator programming challenge. */ public class LatinTranslator extends Application { public void start(Stage stage) throws Exception { // Load the FXML file. Parent parent = FXMLLoader.load(getClass().getResource()); // Build the scene graph. Scene scene = new Scene(parent); // Display our window, using the scene graph. stage.setTitle("Latin Translator"); stage.setScene(scene); stage.show(); } public static void main(String[] args) { // Launch the application. launch(args); } }

---------------------------------------------------------------------------------

This one is fine, it just goes with the first program.

LatinTranslatorController.java

import javafx.fxml.FXML; import javafx.scene.control.Button; import javafx.scene.control.Label;

/** This is the controller class for the Latin Translator programming challenge. */ public class LatinTranslatorController { @FXML private Button sinisterButton;

@FXML private Button dexterButton;

@FXML private Button mediumButton;

@FXML private Label outputLabel;

// Event listener for the sinisterButton public void sinisterButtonListener() { // Display the English translation in the Label. outputLabel.setText("left"); }

// Event listener for the dexterButton public void dexterButtonListener() { // Display the English translation in the Label. outputLabel.setText("right"); }

// Event listener for the mediumButton public void mediumButtonListener() { // Display the English translation in the Label. outputLabel.setText("center"); } }

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

Datacasting How To Stream Databases Over The Internet

Authors: Jessica Keyes

1st Edition

007034678X, 978-0070346789

More Books

Students also viewed these Databases questions

Question

Discuss the key ambient conditions and their effects on customers.

Answered: 1 week ago

Question

Understand the roles of signs, symbols, and artifacts.

Answered: 1 week ago