File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
src/main/java/de/doubleslash/keeptime/view Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 1616
1717package de .doubleslash .keeptime .view ;
1818
19+ import javafx .application .Platform ;
1920import javafx .beans .binding .Bindings ;
2021import javafx .beans .property .BooleanProperty ;
2122import javafx .beans .property .SimpleBooleanProperty ;
@@ -73,6 +74,14 @@ private void initialize() {
7374 sortIndexSpinner .getValueFactory ().setValue (model .getAvailableProjects ().size ());
7475 formValidProperty .bind (Bindings .createBooleanBinding (() -> !nameTextField .getText ().isBlank (),nameTextField .textProperty ()));
7576 validateTextAlert .visibleProperty ().bind (formValidProperty .not ());
77+
78+ Platform .runLater (() ->{
79+ if (nameTextField .getText ().isBlank ()){
80+ nameTextField .requestFocus ();
81+ }else {
82+ descriptionTextArea .requestFocus ();
83+ }
84+ });
7685 }
7786
7887 public void initializeWith (final Project project ) {
You can’t perform that action at this time.
0 commit comments