Question: 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

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!