Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Task t = new Task() {
- @Override
- protected Object call() throws Exception {
- Platform.runLater(() -> {
- try {
- new SisgeFX().start();
- } catch (IOException ex) {
- Logger.getLogger(LoginController.class.getName()).log(Level.SEVERE, null, ex);
- }
- });
- return null;
- }
- };
- region.visibleProperty().bind(t.runningProperty());
- pi.visibleProperty().bind(t.runningProperty());
- Thread th = new Thread(t);
- th.start();
- @FXML
- private void sysLogin() {
- String user = ctfUserLogin.getText();
- String pass = ctfPassLogin.getText();
- LoginDAO loginDAO = DAOFactory.make(LoginDAO.class);
- Login login = loginDAO.getLogin(user, pass);
- if (login != null) {
- runThread(); // aqui chamo a Thread postado acima.
- ctfPassLogin.setStyle(null);
- ctfUserLogin.setStyle(null);
- } else {
- ctfPassLogin.clear();
- ctfUserLogin.clear();
- ctfPassLogin.setStyle("-fx-border-color:red;");
- ctfUserLogin.setStyle("-fx-border-color:red;");
- //new ShakeTransition(vBox).play();
- new WobbleTransition(vBox).play();
- //new TadaTransition(vBox).play();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement