-2

I have no idea how to do this red line picture

GridPane left = new GridPane();
            root.setLeft(left);
            left.setPadding(new Insets(10, 10, 10, 15));
            Label l1=new Label("Panel plików");
            left.addRow(0,l1);
            left.setPrefSize(350, Double.MAX_VALUE); 
            Border b = new Border(new BorderStroke(Color.RED, BorderStrokeStyle.SOLID, CornerRadii.EMPTY, BorderWidths.DEFAULT)); 
            left.setBorder(b);

Can you help me?

1 Answers1

1

Use a stackpane, draw a rectangle on it, and then add another pane but this time anchor, so you can the layoutX and Y of the label, and also style the label with css (fx-background-color) giving the effect of the background. When done with the anchorpane, add another stackpane, this time, to implement your gridpane.

Tega Steve
  • 11
  • 1