Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8261077

TextAreaSkin.dispose() throws UnsupportedOperationException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • jfx11, jfx12, jfx15, jfx16
    • javafx
    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      The method always fails due to throwing hardcoded exception

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Calling TextAreaSkin.dispose() directly, or by calling textArea.setSkin(null or some skin)

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Should never fail
      ACTUAL -
      Always fails

      ---------- BEGIN SOURCE ----------

      import javafx.application.Application;
      import javafx.application.Platform;
      import javafx.scene.Scene;
      import javafx.scene.control.TextArea;
      import javafx.scene.layout.StackPane;
      import javafx.stage.Stage;

      /** Showcasing javafx bug */
      class JavaFxBugTextAreaDispose extends Application {

      public static void main(String[] args) {
      launch(args);
      }

      @Override
      public void start(Stage stage) {
      final TextArea textArea = new TextArea();
      final StackPane background = new StackPane(textArea);
      final Scene scene = new Scene(background, 600, 500);

      stage.setScene(scene);
      stage.show();

      Platform.runLater(() -> {
      background.getChildren().clear();
      textArea.setSkin(null);
      });
      }

      }
      ---------- END SOURCE ----------

      FREQUENCY : always


            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: