Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void startLanguageTimer() {
- Thread thread = new Thread(() -> {
- while (true) {
- Platform.runLater(() -> {
- InputContext context = InputContext.getInstance();
- labelLanguage.setText(context.getLocale().getLanguage());
- });
- try {Thread.sleep(1000);} catch (InterruptedException ex)
- {System.out.println("Ошибка обновления потока для клавиатуры");}
- }
- });
- thread.setDaemon(true);
- thread.start();
- }
Add Comment
Please, Sign In to add comment