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

Button containing graphic with minimum size cuts off text

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8u60
    • 8u40
    • javafx
    • Mac OSX 10.10
      jdk 8u40 build 22

      Run following test program. Text of button is cut off. Removing the setMinSize on the label restores correct functionality.

      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.Button;
      import javafx.scene.control.Label;
      import javafx.scene.layout.BorderPane;
      import javafx.stage.Stage;

      public class GraphicBug extends Application {
      public static void main(String[] args) {
      Application.launch(args);
      }

      public void start(Stage stage) throws Exception {
      Label l = new Label("1");
      l.setMinSize(20, 20);
      Button b = new Button("Button", l);
      BorderPane bp = new BorderPane(b);
      Scene scene = new Scene(bp, 800, 600);
      stage.setScene(scene);
      stage.show();
      }
      }

            jgiles Jonathan Giles
            cstanford Curtis Stanford
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: