Philippe Lhoste

+ Follow
since Oct 23, 2009
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Philippe Lhoste

That's something extremely hard, or even impossible to do, at least in a cross-browser way. Unless I am proven otherwise... :-)

At one time, I just tried to detect with JavaScript when the user closes the current tab or the whole window (to logout automatically).
There are onUnload and onBeforeUnload events in JavaScript, but only some browsers support it, as the modern versions drop it: it have been too abused by JavaScript ad popups... Opera, for example, doesn't support it at all. And beside this event is triggered on a simple page refresh.

But I digress, that's not what you asked for.
Come to think of it, a possible way to explore is to use onBlur, ie. to check if the page (or the applet, perhaps) lost the focus. Not sure if that's reliable, might happen, eg., if the user just go to the browser's menu.
12 years ago
I think it would have been better to complement the Recommended Books for JavaFx thread which is recent.
12 years ago
I haven't read any book on JavaFX yet, so it is hard to recommend one.
I suggest to search for JavaFX on Amazon, AFAIK there is less than half a dozen of books, so choice should be quick. I think these books are all good, made by passionates, early adopters... Ideally, if you can, browse them and see which one fits your needs (more enterprise, more "flashy") or your taste (style...). It is better to be sure they are up to date (taking in account changes brought by v.1.2).
12 years ago
First advice: when looking information on JavaFX, discard anything posted before December 2008 (see your link: 2008/08/05/watch_javafx_sdk_run_on_linux.html). The pre-release version and the 1.0 version are very different.

Today, JavaFX is available on both Linux and Solaris (IIRC).
And yes, there is quite some platform-specific code, to accelerate graphics (GPU-bound), via system API (eg. using Direct3D on Windows). That's why most JavaFX effects (blur, shadows...) are not available on the mobile platform (no GPU).
12 years ago

Gregg Bolinger wrote:If the plugin still sucks, it won't work. And I'm sorry, but the java plugin is still atrocious.

Applet mode is important but not mandatory. Lot of people target the desktop (Web Start mode).
But, yes, applet start up should be improved (should work as well at JNLP, and faster in general), and mobile support has a long way to get usable too.
12 years ago
JavaFX code is compiled to Java bytecode, then packaged into a jar file (on a dev computer, then transfered to the server). The jar file is then sent by the server to the browser.
It is executed on the client side, by the local JVM and automatically downloaded JavaFX runtime.

So, it is client side but users cannot see the JavaFX code, unlike JavaScript.

Books: I suggest to search Amazon or similar for JavaFX, there is now 3 or 4 books on the topic.
Tutorials: see Learn JavaFX - FAQs, Tutorials, and APIs | Get Started with Java FX page for a good start, there are many other good tutorials and articles on the Web too.
12 years ago
If I understood correctly, you need a recent graphics card to get GPU acceleration, with shaders 2.0 IIRC.
I know I don't get such acceleration (ie. scenegraph is rendered on CPU) on the old hardware (5 years...) I use at work and at home...
12 years ago

nayela khan wrote:creates a projectName.jnlp file which i can add to widgetFX dock

For the record (I already answered in the Sun forum...), WidgetFX requires its widgets to be signed like an applet when doing system access.
12 years ago
It is a bit bold to ask a question about Flex in a forum on JavaFX, a concurrent technology!
12 years ago

nayela khan wrote:AccessControlException:access denied

Are you testing it in applet mode? In this case, you must sign the applet.

Looking again, I see backslashes. You are on Windows? You should specify a drive (absolute path), I think, something like: "E:/temp/test.xml"
It is hard to say on which drive the current directory is (unless you have only one disk & partition).
12 years ago

Mathew Kuruvilla wrote:the logical flow for me was to to have the applet forward the request to the next page just like it is done in html.

Urm, in Web 1.0 HTML... :-D
Today, even in pure HTML (with a good sprinkle of JavaScript, of course), the trend is to remain on the same page for most operations: JavaScript is in change of communicating with the server via HTTP XML (or Json or other) requests, receiving the answer and dynamically updating the page with the results.
That's called Ajax... ;-) (your option d)

In JavaFX (or regular applets), you can do exactly the same thing. You don't even have to reach down the JavaScript level, JavaFX has a full blown HttpRequest API with Json and XML parsers to use the answer. You can find several samples from official JavaFX site which query a server (like Yahoo! or Flikr) and update the applet.

In JavaFX, you can just switch scenes when you need to change dramatically the content (from login screen to main display, for example).
12 years ago
Again, I will point to another thread... :-) (I love hyperlinking/cross-references...) :-D

In What am I doing wrong??? -- HashMap containing Sequences... the OP have found a solution by wrapping the sequence. Not super elegant but if it works...
12 years ago
Clarence, for the record, you are in a JavaFX forum, not in a Java one.

Beside, you should give a more precise specification of your needs.
If I understood correctly, you actually want to reformat your text with hard-wrapping at word boundary at a given char (line width) limit. Right?
12 years ago
Again I point to a similar question: Graph and vertical labels.
The lack of answer might mean it isn't currently possible.

Note there is another interesting thread: Javafx line chart with data labels which shows you can do an action on mouse over, eg. displaying a full label in a tooltip...
12 years ago
The issue looks similar to the one shown in Y Axis Labels replaced with "..." on redraw thread.
The chart library is still young...

I don't know if you can force a redrawing, that's another quite common question...
I saw a workaround, a bit kludgy but at least working: resize the stage, increasing its width of some pixels, then resize it down... Downside: it is ugly!
12 years ago