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

Add convenience factory methods for Border and Background

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • jfx18
    • jfx17
    • javafx
    • None

      It's lengthy to create simple borders and backgrounds:

      new Border(new BorderStroke(Color. BLACK, BorderStrokeStyle.SOLID, null, null));
      new Background(new BackgroundFill(Color.BLACK, null, null));

      Adding convenience factory methods can make this easier:

      Border.of(Paint stroke), or Border.stroke(Paint stroke)
      Background.of((Paint fill), or Background.fill(Paint fill)

            nlisker Nir Lisker
            nlisker Nir Lisker
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: