package holeg.ui; import holeg.GridSolverResult; import javax.swing.*; public class SolveResultMessageBox { public static void show(GridSolverResult result) { switch(result) { case Error: JOptionPane.showMessageDialog(null,"Could not solve grid.","Error while solving.", JOptionPane.ERROR_MESSAGE); break; case PartialFailure: JOptionPane.showMessageDialog(null,"Could not solve some part of the grid.","Error while solving.", JOptionPane.ERROR_MESSAGE); break; case Solved: JOptionPane.showMessageDialog(null,"Successfully solved!","Success", JOptionPane.INFORMATION_MESSAGE); break; } } }