Button containing graphic with minimum size cuts off text

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 8u60
    • Affects Version/s: 8u40
    • Component/s: javafx
    • Environment:

      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();
      }
      }

            Assignee:
            Jonathan Giles
            Reporter:
            Curtis Stanford
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: