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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

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

Processing
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,709 views