Meaningless Drivel is fun!*
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
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!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Style textfields and comboboxes
 
Similar Threads
problems with two divs sitting next to the other.
Struts 2 - Use custom design (from CSS) on submit buttons
HTML Table "Stripes" with CSS
List item disappears in Firefox
tabbed pane