Advertisement
javaprogrammer1996

updated

Sep 10th, 2015
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.47 KB | None | 0 0
  1. package application;
  2. import java.net.URL;
  3. import java.util.ResourceBundle;
  4.  
  5. import javafx.application.Application;
  6. import javafx.fxml.FXML;
  7. import javafx.fxml.FXMLLoader;
  8. import javafx.fxml.Initializable;
  9. import javafx.scene.Group;
  10. import javafx.scene.Parent;
  11. import javafx.scene.Scene;
  12. import javafx.scene.control.RadioButton;
  13. import javafx.scene.control.TextField;
  14. import javafx.scene.control.ToggleButton;
  15. import javafx.scene.control.ToggleGroup;
  16. import javafx.stage.Stage;
  17.  
  18.  
  19.  
  20. // Setting up the window
  21. public class MainController extends Application implements Initializable  {
  22.    
  23.     @FXML
  24.     private TextField inputCSP;
  25.    
  26.     @FXML
  27.     private RadioButton callBox1;
  28.    
  29.     @FXML
  30.     private RadioButton putBox1;
  31.    
  32.    
  33.    
  34.  
  35.     public void start(Stage primaryStage) throws Exception {
  36.        
  37.         final ToggleGroup group2 = new ToggleGroup();
  38.         callBox1.setToggleGroup(group2);
  39.         putBox1.setToggleGroup(group2);
  40.         callBox1.setSelected(true);
  41.        
  42.        
  43.        
  44.  
  45.         Parent root = FXMLLoader.load(getClass().getResource(("/application/fxml.fxml")));
  46.         Scene scene = new Scene(root, 640, 400);
  47.        
  48.         primaryStage.setScene(scene);
  49.         primaryStage.setTitle("Black-Scholes Pricer (European Options) ");
  50.         primaryStage.setResizable(false);
  51.         primaryStage.show();
  52.        
  53.        
  54.  
  55.        
  56.  
  57.        
  58.        
  59.    
  60.     }
  61.     public static void main(String[] args) {
  62.         launch(args);
  63.     }
  64.     public void initialize(URL arg0, ResourceBundle arg1) {
  65.          
  66.     }
  67.  
  68.    
  69.    
  70. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement