import javafx.scene.layout.BorderPane;
import javafx.scene.layout.HBox;
import javafx.scene.text.Text;
import javafx.scene.control.Button;
import javafx.geometry.Pos;

public class SudokuGUI extends BorderPane {

  public SudokuGUI() {
    drawGUI();
  }

  private void drawGUI() {
    Text tMessage = new Text();
    SudokuPane sPane = new SudokuPane();
    Button btSolve = new Button("Solve");
    Button btClear = new Button("Clear");

    btSolve.setOnAction(e -> solve(sPane, tMessage));
    btClear.setOnAction(e -> clear(sPane, tMessage));

    HBox hbControl = new HBox(10);
    hbControl.getChildren().addAll(btSolve, btClear);
    hbControl.setAlignment(Pos.CENTER);

    setTop(tMessage);
    setCenter(sPane);
    setBottom(hbControl);
    setAlignment(tMessage, Pos.CENTER);
  }

  private void solve(SudokuPane sPane, Text tMessage) {
    try {
      if (!sPane.solve()) {
        tMessage.setText("Only 1-9 or empty spaces allowed");
      }
    } catch (IllegalArgumentException ex) {
      tMessage.setText("Invalid Sudoku Grid");
    }
  }

  private void clear(SudokuPane sPane, Text tMessage) {
    sPane.clear();
    tMessage.setText("");
  }
}

@@ -480,24 +480,33 @@
 ne, tMessage
+, btSolve
 ));%0A    btCl
@@ -547,16 +547,25 @@
 tMessage
+, btSolve
 ));%0A%0A   
@@ -850,32 +850,48 @@
 e, Text tMessage
+, Button btSolve
 ) %7B%0A    try %7B%0A  
@@ -974,24 +974,73 @@
  allowed%22);%0A
+      %7D else %7B%0A        btSolve.setDisable(true);%0A
       %7D%0A    
@@ -1189,16 +1189,32 @@
 tMessage
+, Button btSolve
 ) %7B%0A    
@@ -1254,14 +1254,45 @@
 xt(%22%22);%0A
+    btSolve.setDisable(false);%0A
   %7D%0A%7D%0A

Disable Solve button after a valid solution is found