Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

TextField border-color

JomarApr 30 2014 — edited May 5 2014

Hi,

I made a simple app login in Netbeans 8.0 and jdk8.

Whenever the user leaves the field empty: the color changes.

userBd.focusedProperty().addListener( new ChangeListener(){

                public void changed(ObservableValue observable, Object oldValue, Object newValue) {

                    if(newValue.toString().equals("false") && ( userBd.getLength() == 0 ))

                       userBd.setStyle("-fx-border-color: red;");

                     else

                       userBd.setStyle("-fx-border-color: null;");

                  

                      

               }

         });

Only the fields that move up or down ...

How to solve?

Regards

Jomar

This post has been answered by James_D on Apr 30 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 2 2014
Added on Apr 30 2014
11 comments
5,872 views