How to fix or set the label height and width with respect to GridPane row height and column width by using JavaFX and Scene Builder?
<p>How to set height and width of the <code>Label</code> with respect to <code>GridPane</code> row height and column width? </p>

<p>Please check my below images</p>

<p>this image is minimized screen
<a href="https://i.stack.imgur.com/SYyMd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SYyMd.png" alt="this one is my minimized screen image"></a></p>

<p>this one is maximized screen
<a href="https://i.stack.imgur.com/y5U7M.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y5U7M.png" alt="This one is my maximized screen image"></a></p>

<p>this image is my label layout properties<br>
<a href="https://i.stack.imgur.com/tWoK5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tWoK5.png" alt="This are my label layout properties"></a></p>

<p>I want to resize the <code>Label</code> with respect to <code>GridPane</code> row height and column width.</p>

<p>Through code I am setting the background color for the label like below.</p>

<pre><code>if(cmnd1.WIM.equals("Y")){
   javafx.application.Platform.runLater( new Runnable() {
        @Override
        public void run() {
            lsduController1.oneWIM.setGraphic(new ImageView(new Image("/images/Wim_T.png")));
            lsduController1.oneWIM.setStyle("-fx-background-color: none;");
        }
   });
} else {
    javafx.application.Platform.runLater( new Runnable() {
        @Override
        public void run() {
            lsduController1.oneWIM.setGraphic(new ImageView(new Image("/images/Wim_F.png")));
            lsduController1.oneWIM.setStyle("-fx-background-color: Red;");
        }
    });
}
</code></pre>