Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package application;
- import java.net.URL;
- import java.util.ResourceBundle;
- import javafx.application.Application;
- import javafx.fxml.FXML;
- import javafx.fxml.FXMLLoader;
- import javafx.fxml.Initializable;
- import javafx.scene.Group;
- import javafx.scene.Parent;
- import javafx.scene.Scene;
- import javafx.scene.control.RadioButton;
- import javafx.scene.control.TextField;
- import javafx.scene.control.ToggleButton;
- import javafx.scene.control.ToggleGroup;
- import javafx.stage.Stage;
- // Setting up the window
- public class MainController extends Application implements Initializable {
- @FXML
- private TextField inputCSP;
- @FXML
- private RadioButton callBox1;
- @FXML
- private RadioButton putBox1;
- public void start(Stage primaryStage) throws Exception {
- final ToggleGroup group2 = new ToggleGroup();
- callBox1.setToggleGroup(group2);
- putBox1.setToggleGroup(group2);
- callBox1.setSelected(true);
- Parent root = FXMLLoader.load(getClass().getResource(("/application/fxml.fxml")));
- Scene scene = new Scene(root, 640, 400);
- primaryStage.setScene(scene);
- primaryStage.setTitle("Black-Scholes Pricer (European Options) ");
- primaryStage.setResizable(false);
- primaryStage.show();
- }
- public static void main(String[] args) {
- launch(args);
- }
- public void initialize(URL arg0, ResourceBundle arg1) {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement