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

BorderWidths other than top are ignored even when the Region has no shape

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8
    • javafx
    • None
    • Window 7 64-bit /jdk-8-ea-docs-b109-all-26_sep_2013

      The BorderWidths other than top areignored even when the Region has no shape.
      Here is a simple test app.

      public class JavaFXTest extends Application {
        
        @Override
        public void start(Stage primaryStage) {
          Button btn = new Button();
          btn.setShape(null);
          btn.setBorder(new Border(new BorderStroke(Color.RED, BorderStrokeStyle.SOLID, CornerRadii.EMPTY, new BorderWidths(10,1,1,1))));

          btn.setText("Say 'Hello World'");
          btn.setOnAction(new EventHandler<ActionEvent>() {
            
            @Override
            public void handle(ActionEvent event) {
              System.out.println("Hello World!");
            }
          });
          
          StackPane root = new StackPane();
          root.getChildren().add(btn);
          
          Scene scene = new Scene(root, 300, 250);
          
          primaryStage.setTitle("Hello World!");
          primaryStage.setScene(scene);
          primaryStage.show();
        }

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

            Unassigned Unassigned
            ddecoteaujfx Don DeCoteau (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Imported: