aspose file tools*
The moose likes JavaFX and the fly likes Blinking text in javafax Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » JavaFX
Bookmark "Blinking text in javafax" Watch "Blinking text in javafax" New topic
Author

Blinking text in javafax

Suparn Gupta
Greenhorn

Joined: Feb 26, 2012
Posts: 16
Hi,

I recently started using JavaFX for a desktop application. I need to display a blinking text. It can be anywhere like as a label or in a textarea. I created the CSS and used -fx-text-decoration:blink. But it doesnt work? Can anybody help me to get around with this?
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4658
    
    5

First off, I know from your other thread that you're asking about JavaFX 2, but you always need to mention that clearly, as there are considerable differences between 1.x and 2.x and you could end up with the wrong advice, while some other member finds he has wasted his time and effort advising you on the wrong version.

Have you gone through the JavaFX CSS Reference Guide? I don't see the property you're trying to set there, nor any occurrence of the word "blink." Not only that, this page on w3schools says
The "blink" value is not supported in IE, Chrome, or Safari.


You could probably achieve your goal by using a FadeTransition.


luck, db
There are no new questions, but there may be new answers.
Suparn Gupta
Greenhorn

Joined: Feb 26, 2012
Posts: 16
I apologize for not mentioning the version. I was talking about the version 2.1. Can you advice me, which technology is best for creating GUIs? I know its a vague ques as it ll depend on what kind of application I want to develop. But I wanna learn something from which I can create beautiful looking desktop applications eg. form fillers or some payroll management systems for desktops. I like FX but it feels restricted to work with it since we dont have much designer tools for it. Also the event handling and scripting part is kind of prohibitive for me. I find swings far more easy. But yet again, they look like old age windows. I am confused. There must be something that I am unaware of. Maybe you can tell me!!
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4658
    
    5

Most of that was already discussed on your earlier thread.

FX bindings may be verbose now, but once Java 8 introduces closures they will become much more succinct. As for
which technology is best for creating GUIs?
the answer to that is -- it's subjective. Make your own choice.

Go through the rest of the tutorial I linked above. There is a designer tool for FX, and there's FXML. All visual designers are to be considered advanced tools, so regardless of the toolkit you choose, you should start with hand coding until you have enough understanding of the API to use a visual designer effectively. By which time you may decide it's not worth the extra effort, since hand coding isn't that difficult once you get used to the API.
Suparn Gupta
Greenhorn

Joined: Feb 26, 2012
Posts: 16
I realize that my reluctance towards hand coding GUIs is the issue. I must get over it. Thanks for the help...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Blinking text in javafax