Monday, June 27, 2016

JAVAFX THREAD



JAVAFX THREAD TO CHANGE UI (USER INTERFACE) FORM DYNAMICALLY


import javafx.application.Platform;

Platform.setImplicitExit(false);
            Task task = new Task<Void>() {
                @Override
                public Void call() throws Exception {
                    int i = 0;
                    Thread.sleep(100);

                    Platform.runLater(new Runnable() {
                        public void run() {

                           
                            proViewContlr.getProView().getScroll()
                                    .setVvalue(0.70);
                        }
                    });

                    return null;

                }
            };
            Thread th = new Thread(task);
            th.setDaemon(true);
            th.start();

No comments:

Post a Comment