javafx and css code to change hyperlink color on mouse hover -
i working java fxml application , have 1 hyperlink, want change color when mouse on , again revert when mouse exited it. can body post code achieve it. tried css code not working,
on mouse entered:- @fxml private void changeclosecolortowhite() { hyplnkclose.setstyle("-fx-color: white;"); } on mouse exited:- @fxml private void changeclosecolortobrown() { hyplnkclose.setstyle("-fx-color: #606060;"); }
thanks in advance.
i found changes in code might work,
try replace "-fx-color:" "-fx-text-fill:"
on mouse entered:- @fxml private void changeclosecolortowhite() { hyplnkclose.setstyle("-fx-text-fill: white;"); } on mouse exited:- @fxml private void changeclosecolortobrown() { hyplnkclose.setstyle("-fx-text-fill: #606060;"); }
Comments
Post a Comment