I would like to find out if the column "KEY" from my "Settings" table has any value or not. If it has, the main function (Monitoring.start) should run, if not the Settings form should pop-up first (stage.show) and require for a fulfill.
URL urlSettings = new File("src/main/java/com/svt/optimoo/Settings.fxml").toURL();
Parent rootSettings = FXMLLoader.load(urlSettings);
Stage stage = new Stage();
stage.initModality(Modality.APPLICATION_MODAL);
stage.initStyle(StageStyle.DECORATED);
stage.setResizable(false);
stage.setTitle("Settings");
stage.setScene(new Scene(rootSettings, 326, 216));
if (Settings.COLUMN_KEY.isEmpty()) {
final JPanel panel = new JPanel();
JOptionPane.showMessageDialog(panel, "No data found in the given column!");
stage.show();
}
else {
Monitoring.start();
}