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

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

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 8
    • Fix Version/s: tbd
    • Component/s: javafx
    • Labels:
      None
    • Environment:

      Window 7 64-bit /jdk-8-ea-docs-b109-all-26_sep_2013

      Description

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

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Imported: