Desktop Java
JavaFX 2 Form with Tron effect
This is a simple JavaFX Login Form with a TRON like effect. In this example I am using CSS to style the TextField and Button. Here is the snippet of the CSS and Effect code:
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 | .text-field{ -fx-background-color: transparent; -fx-border-color: #00CCFF; -fx-text-fill: white; } .password-field{ -fx-background-color: transparent; -fx-border-color: #00CCFF; -fx-text-fill: white; } .button{ -fx-background-color: transparent; -fx-border-color: white; -fx-background-radius: 30; -fx-border-radius: 30; -fx-text-fill: white; -fx-font-weight: bold; -fx-font-size: 14px; -fx-padding: 10 20 10 20; } |
1 2 3 4 5 | DropShadow effect = new DropShadow(); effect.setColor(color); effect.setBlurType(BlurType.GAUSSIAN); effect.setSpread(spread); effect.setRadius(radius); |
Reference: JavaFX 2 Form from our JCG partner Mark Anro Silva at the GlyphSoft blog.
I retired and thought I will keep myself busy by joining a course to do diploma in software development. I was struggling to grasp the concepts in Java and JavaFX since July 2019. This is THE BEST website to learn JavaFX.
Your simple explanation has helped me a lot….