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

TitledPane doesn't crop title text to fit

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8u60
    • 8u20
    • javafx
    • None
    • Window 7 64-bit
      Java(TM) SE Runtime Environment (build 1.8.0_40-ea-b20)

      package titledpanecrop;

      import javafx.application.Application;
      import javafx.geometry.Insets;
      import javafx.scene.Scene;
      import javafx.scene.control.Label;
      import javafx.scene.control.TitledPane;
      import javafx.scene.layout.VBox;
      import javafx.stage.Stage;

      public class TitledPaneCrop extends Application {

      @Override
      public void start(Stage primaryStage) {
      Label myLabel = new Label("Hello World");
      TitledPane tp = new TitledPane("This is a long title - resize the window smaller and see what happens", null);
      tp.setContent(myLabel);
      tp.setMinWidth(100);
      VBox root = new VBox();
      root.setPadding(new Insets(20));
      root.getChildren().add(tp);
      Scene scene = new Scene(root, 300, 250);
      primaryStage.setTitle("TitledPane Crop bug");
      primaryStage.setScene(scene);
      primaryStage.show();
      }

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

            jgiles Jonathan Giles
            swpalmer Scott Palmer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: