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

[TitledPane] : Text in TitledPane cropped

XMLWordPrintable

      Text in TitledPane cropped, see screenshot.Maybe text need cropping with ellipsis?
      @Override
          public void start(Stage stage) throws Exception {
              TitledPane pane1 = new TitledPane();
              pane1.setText("title 1\nLong text long text");
              pane1.setContent(new Rectangle(100, 40, Color.SKYBLUE));
              pane1.setFocusTraversable(false);
              TitledPane pane2 = new TitledPane();
              pane2.setText("title 2\nLong text long text");
              pane2.setContent(new Rectangle(100, 40, Color.BLUEVIOLET));
              Accordion acc = new Accordion();
              acc.getPanes().addAll(pane1, pane2);
              acc.setExpandedPane(pane2);
              pane2.setAnimated(false);
              pane2.setFocusTraversable(false);
              acc.setFocusTraversable(false);
              
              acc.setStyle(style);
              
              BorderPane root = new BorderPane();
              Pane pane = new Pane();
              pane.getChildren().add(acc);
              pane.setMaxSize(100, 100);
              root.setCenter(pane);
              Scene scene = new Scene(root, 500, 500);
              stage.setScene(scene);
              stage.show();
          }

            psomashe Parvathi Somashekar (Inactive)
            slugovoy Sergey Lugovoy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: