Question
Please provide the TempretureConverterController code based on the following TempretureConverter main class and TempretureConverter.fxml code. Use JavaFX and SceneBuider. TempretureConverter.java package application; import javafx.application.Application; import
Please provide the TempretureConverterController code based on the following TempretureConverter main class and TempretureConverter.fxml code.
Use JavaFX and SceneBuider.
TempretureConverter.java
package application; import javafx.application.Application; import javafx.stage.Stage; import javafx.scene.Scene; import javafx.scene.layout.GridPane; import javafx.fxml.FXMLLoader;
public class Main extends Application { @Override public void start(Stage primaryStage) { try { GridPane root = (GridPane)FXMLLoader.load(getClass().getResource("TempretureConverter.fxml")); Scene scene = new Scene(root,400,400); scene.getStylesheets().add(getClass().getResource("application.css").toExternalForm()); primaryStage.setScene(scene); primaryStage.show(); } catch(Exception e) { e.printStackTrace(); } } public static void main(String[] args) { launch(args); } }
TempretureConverter.fxml
Output
- Fahrenheit 50 Fahrenheit 75 Fahreneit: 150 Celsius: -46 Celsius: 24 Celsius
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started