@FXML private void Reload(ActionEvent event) { System.out.println("Test Reload"); handeller.setOptionword(hang.OptionSize); Toption.setText(hang.optionword); data.add(" ------------ "); data.add("Option : " + hang.optionword); }
@FXML private void playGame(ActionEvent event) { if (!hang.ingame) { System.out.println("Test PlayGame"); try { System.out.println(" Word size" + Rwordsize.getText()); String s = Rwordsize.getText(); System.out.println("Integer.getInteger(s) : " + Integer.valueOf(s)); hang.OptionSize = Integer.valueOf(s); } catch (Exception e) { System.out.println("Error " + e); } Bplay.setText("Ok i am than here"); System.out.println("WordSize PlayGame"); Rwordsize.setDisable(true); hang.ingame = true; Breload.setDisable(false); Btest.setDisable(false); Rword.setDisable(false); handeller.setOptionword(hang.OptionSize); Toption.setText(hang.optionword); data.add("Option : " + hang.optionword); } else { data.clear(); hang.ingame = false; hang.score = 0; Tscore.setText("0"); Image image = new Image("/resource/original.gif"); img.setImage(image); Bplay.setText("play"); Breload.setDisable(true); Btest.setDisable(true); Rword.setDisable(true); Rwordsize.setDisable(false); Toption.setText("................"); } }