This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes JavaFX and the fly likes Style textfields and comboboxes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » JavaFX
Bookmark "Style textfields and comboboxes" Watch "Style textfields and comboboxes" New topic
Author

Style textfields and comboboxes

M Bryan
Ranch Hand

Joined: Jun 15, 2011
Posts: 64
Hi,

I am currently working on styling my textfields and comboboxes, but there is a small problem.
I want both to have white border on default, a grey border when hovering them and a blue border when they are focused. This works quite well, but as soon as I start typing, they lose their border color respectivly it gets white again.

This is what my css looks like:



Thank you!
Volodymyr Levytskyi
Ranch Hand

Joined: Mar 29, 2012
Posts: 505
    
    1

This style works for me on TextField:

After I start typing or even close window it works and I apply this style by :


True person is moral, false is right!
 
Consider Paul's rocket mass heater.
 
subject: Style textfields and comboboxes