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

[ChoiceBox] popup looks strange after refilling.

    XMLWordPrintable

Details

    Description

      Run code, watch movie.


      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.ChoiceBox;
      import javafx.scene.control.ListView;
      import javafx.scene.layout.VBox;
      import javafx.stage.Stage;

      public class JavaApplication39 extends Application {

          public static void main(String[] args) {
              launch(args);
          }
          ChoiceBox cb;
          ListView objectList;

          @Override
          public void start(Stage stage) throws Exception {
              cb = new ChoiceBox();

              cb.getItems().add("1");
              cb.getItems().add(3);
              cb.getItems().add(false);
              cb.setConverter(null);

              VBox vb = new VBox();
              vb.getChildren().add(cb);

              Scene scene = new Scene(vb, 300, 300);
              stage.setScene(scene);
              stage.show();

              cb.getItems().clear();
              cb.getItems().add("1");
              cb.getItems().add(3);
              cb.getItems().add(false);
              cb.setConverter(null);
          }
      }

      Attachments

        Activity

          People

            psomashe Parvathi Somashekar (Inactive)
            akirov Alexander Kirov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported: