import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.Pane;
import javafx.stage.Stage;
import javafx.scene.web.*;
import javafx.scene.control.*;
import javafx.event.*;
import javafx.scene.text.*;
import javafx.scene.text.Font;
import javafx.scene.input.*;
import javafx.event.Event;


import javafx.scene.paint.Color;


/**
 *
 * Beschreibung
 *
 * @version 1.0 vom 17.12.2024
 * @author 
 */

public class wiederTesten extends Application {
  // Anfang Attribute
  private Pane pane1 = new Pane();
  private Button button1 = new Button();
  private Button button2 = new Button();
  private MenuBar menuBar1 = new MenuBar();
    private Menu menuBar1_File = new Menu("File");
      private Menu menuBar1_File_New = new Menu("New");
        private MenuItem menuBar1_File_New_Java = new MenuItem("Java");
        private MenuItem menuBar1_File_New_XML = new MenuItem("XML");
      private MenuItem menuBar1_File_Load = new MenuItem("Load");
      private MenuItem menuBar1_File_Save = new MenuItem("Save");
    private Menu menuBar1_Edit = new Menu("Edit");
      private MenuItem menuBar1_Edit_Copy = new MenuItem("Copy");
      private MenuItem menuBar1_Edit_Paste = new MenuItem("Paste");
      private SeparatorMenuItem menuBar1_Separator1 = new SeparatorMenuItem();
      private MenuItem menuBar1_Edit_Delete = new MenuItem("Delete");
  // Ende Attribute
  
  public void start(Stage primaryStage) { 
    Pane root = new Pane();
    Scene scene = new Scene(root, 540, 371);
    scene.setFill(Color.CYAN);
    // Anfang Komponenten
    
    pane1.setLayoutX(192);
    pane1.setLayoutY(152);
    pane1.setPrefHeight(144);
    pane1.setPrefWidth(160);
    root.getChildren().add(pane1);
    button1.setLayoutX(24);
    button1.setLayoutY(24);
    button1.setPrefHeight(24);
    button1.setPrefWidth(80);
    button1.setText("Button");
    button1.setOnAction(
      (event) -> {button1_Action(event);} 
    );
    button1.setFont(Font.font("Dialog", 11));
    root.getChildren().add(button1);
    root.getChildren().add(menuBar1);
    menuBar1.getMenus().add(menuBar1_File);
    menuBar1_File.getItems().add(menuBar1_File_New);
    menuBar1_File_New.getItems().add(menuBar1_File_New_Java);
    menuBar1_File_New.getItems().add(menuBar1_File_New_XML);
    menuBar1_File.getItems().add(menuBar1_File_Load);
    menuBar1_File.getItems().add(menuBar1_File_Save);
    menuBar1_File_Save.setAccelerator(KeyCombination.keyCombination("Ctrl+Shift+S"));
    menuBar1.getMenus().add(menuBar1_Edit);
    menuBar1_Edit.getItems().add(menuBar1_Edit_Copy);
    menuBar1_Edit_Copy.setAccelerator(KeyCombination.keyCombination("Ctrl+C"));
    menuBar1_Edit.getItems().add(menuBar1_Edit_Paste);
    menuBar1_Edit_Paste.setAccelerator(KeyCombination.keyCombination("Ctrl+V"));
    menuBar1_Edit.getItems().add(menuBar1_Separator1);
    menuBar1_Edit.getItems().add(menuBar1_Edit_Delete);
    menuBar1_File_New_Java.setOnAction(
      (event) -> {menuBar1_File_New_Java_Action(event);} 
    );
    menuBar1_File_New_XML.setOnAction(
      (event) -> {menuBar1_File_New_XML_Action(event);} 
    );
    menuBar1_File_Load.setOnAction(
      (event) -> {menuBar1_File_Load_Action(event);} 
    );
    menuBar1_File_Save.setOnAction(
      (event) -> {menuBar1_File_Save_Action(event);} 
    );
    menuBar1_Edit_Copy.setOnAction(
      (event) -> {menuBar1_Edit_Copy_Action(event);} 
    );
    menuBar1_Edit_Paste.setOnAction(
      (event) -> {menuBar1_Edit_Paste_Action(event);} 
    );
    menuBar1_Edit_Delete.setOnAction(
      (event) -> {menuBar1_Edit_Delete_Action(event);} 
    );
    menuBar1.setPrefWidth(4000);
    // Ende Komponenten
    
    button2.setLayoutX(0);
    button2.setLayoutY(0);
    
    button2.setPrefWidth(100);
    button2.setPrefHeight(50);
    button2.setText("Open");
    button2.setOnAction( (event) -> {open(event);});
    pane1.getChildren().add(button2);
    
    
    primaryStage.setOnCloseRequest(e -> System.exit(0));
    primaryStage.setTitle("wiederTesten");
    primaryStage.setScene(scene);
    primaryStage.show();
    
  } // end of public wiederTesten
  
  // Anfang Methoden
  
  public static void main(String[] args) {
    launch(args);
  } // end of main
  public void open(Event evt) {
  button2.setText("Close");
    
  }
  public void button1_Action(Event evt) {
    // TODO hier Quelltext einfügen
    
  } // end of button1_Action


  public void menuBar1_File_New_Java_Action(Event evt) {
  

  } // end of menuBar1_File_New_Java_Action

  public void menuBar1_File_New_XML_Action(Event evt) {
    // TODO hier Quelltext einfügen

  } // end of menuBar1_File_New_XML_Action

  public void menuBar1_File_Load_Action(Event evt) {
    // TODO hier Quelltext einfügen

  } // end of menuBar1_File_Load_Action

  public void menuBar1_File_Save_Action(Event evt) {
    // TODO hier Quelltext einfügen

  } // end of menuBar1_File_Save_Action

  public void menuBar1_Edit_Copy_Action(Event evt) {
    // TODO hier Quelltext einfügen

  } // end of menuBar1_Edit_Copy_Action

  public void menuBar1_Edit_Paste_Action(Event evt) {
    // TODO hier Quelltext einfügen

  } // end of menuBar1_Edit_Paste_Action

  public void menuBar1_Edit_Delete_Action(Event evt) {
    // TODO hier Quelltext einfügen

  } // end of menuBar1_Edit_Delete_Action
  // Ende Methoden
} // end of class wiederTesten
