Skip to main content

JavaFX bleg

Posted by joshy on August 5, 2008 at 8:54 AM PDT

The initial JavaFX Preview SDK release has gone pretty well. There were a few snafus and broken links, but overall it has gone pretty smoothly for a first preview release. As we plan our next steps I thought I'd ask you all a question. In fact, I'm going to abuse the great power of my blog (2-3 power, to be exact) by begging. So this is a blog beg, or bleg: what samples do you want to see?

If you've downloaded the SDK already what would you like to build but don't know how to? If you haven't downloaded the SDK what sample would inspire you to try it out? If you've already started building an app, what problems you encountered? What could you use help with? Deployment? Media? Animation? Browser integration?

At the end of the day we are making this SDK so that you guys will build interesting applications. What samples can I build to help you do that?

Thanks. Bleg-off.

- Josh

update

I will be in an upcoming Ask the Experts session on JavaFX. On August 18th you'll be able to post questions at the link above for me, Martin Brehovsky, and Larry McDonough.

Comments

I would like at least one example of custom transition (i.e. a transition which manipulates some property which there is not already a transition for) because the API docs seem to be very secretive of how to do it. That, plus examples of how to use the Interpolatable interface for each component which implements it, e.g. why does Text have this and what you can do with it. Again, primarily because the API docs keep you in the dark about it.

Been reading a lot about javaFX mixing with Swing. This post might be welcome to some http://learnjavafx.typepad.com/weblog/2009/02/miglayout-comes-to-javafx....

Enterprise, enterprise, enterprise!!! Java's strength is building robust enterprise applications. Its weakness is how long it takes to do so. We need demos that show how JavaFX builds on the strengths and addresses the weaknesses. Pretty picture demos are lovely but they belong in the shop front - there's some pretty heavy lifting that has to happen in the back office.

The best sample for me would be integrating EJB3 (JPA) or Hibernate with JavaFX. Now I'm working with Flex for this, but have a lot of problems :-( with DataManagementServices, and don't like it.

Ok, here's a suggestion, write a JavaFX video chat client. That's something that is lacking on some platforms and this one would be as universal as the JavaFX platform. It would be less than trivial for the capture side (I would think) and it's the sort of application that can show some sizzle while still being useful outside of the demo itself. If you make it use the jabber/xmpp protocol it should be able to work with GTalk. Now that would be a sweet demo.

Any of the examples mentioned that would allow me to place data-driven JavaFX "widgets" on a Swing control/Panel would be absolutely terrific. I'm expecting it to be a lot of work, since Swing can't call FX yet, but help finding the easiest (least messy) way to go the other way would be much appreciated.

#1 An app that shows me how using JavaFx is easier than swing for a simple (but not too simple) form based application. Antbuster! http://www.rstein.org/antbuster/index.php :-)

I'd like to see the javafxdoc at http://javafx.com/releases/preview1/docs/api/ able to be commented in the style of the PHP site (e.g.) http://au.php.net/language.types.string This allows alot of the finer points of the doco to be clarified by the community without having to find tutorials.

Click the screenshot and watch the video: http://tictag.cc/ It is a visually interactive way to search the web. It looks very cool and would be a good example for JavaFX.

Wonder why also. JavaFX script is supposed to be simple to use because Swing is complex for designers to use. That's the reason that Sun decided to develop JavaFX. Now we see that as Swing developers, we'll need to learn how to work with JavaFX script. Would it that make Swing more complex ? I would really like see that Sun could focus on the core Java and Swing development instead of this toy like FX script. We are still waiting to see the final release of 10u6 and the On2 codec promised at last Java One can't be found anywhere. Swing has been developed for almost 10 years to get to what it is today. I'm not convinced that JavaFX script can be anything better in just less than 2 years.

Enterprise, Enterprise, Enterprise.... CRUD apps using web services (all flavors) with a local caching mechanism (JavaDB, Berkeley JE). RIA will take over the enterprise space, I am convinced of it, but we need to do what enterprise apps do, that is present important business data and enforce business process that has been centralized both from a persistence and security perspective. We also need to bring the UI out of the dark ages, so we need drag-and-drop UIs with configurable widgets. We desperately want to do it with Java, show us some standard CRUD apps working against services, with tables and forms.

Hi Josh, I´d like to see a Drag 'n Drop example moving a Node between windows Thanks, Stan

Hi, I would like to be able to use the JMC video components to both play a video and also to process a video. For example, I want to be able to grab frames from a video file and place them on a openGL texture. Or to grab each frame as it is playing and apply a photosop type filter to it. Right now I am using the fobs4jmf ffmpeg wrapper, but it is annoying to use the JMF code, and also there are certain limitiations-- for instance it doesn't work with Java 1.6 on mac osx, and registering codec is confusing, etc. The Java Media Components are the main reason I am interested in fx. Right now the player looks really bad, and the only thing it seems to play are .wmv files on windows! I don't care too much about the player, but I do care very much about having the ability to access the frames for video processing, etc. Thanks, sj

1. a simple one: pretty scrollbars, by that i don't mean swing+themes, but javafx scrollbars with custom made buttons. 2. webcam access (is there even a way???) 3. the first app i was trying to code was a multi-file uploader, one thing i was missing was a dead simple Http class with methods like Http.get( url, [params], [callback] ) and Http.post( url, [params], [callback] ). if something like this is not gonna be part of a future release it'd be nice having it in one of the samples. another thing that has nothing to do with samples, so you might as well just ignore it: is there always going to be that sun logo spinning when applets startup? i'd prefer putting my own picture there instead of having my website branded by sun. (i think some versions of the jre even link to sun if you happen to click on this spinning thingie)

Josh, Just wondering if you've heard of the Dirac video codec, may be off topic for this post, but it might be something that Sun should look at. I know you have the On2 codecs coming, but since they are proprietary they can never be included in the OpenJDK (at least I think). Dirac is MIT licenced and could be included with the OpenJDK with Vorbis for audio. http://diracvideo.org/ Any Thoughts on this?

I develope a Netbeans RPC. I use components from Netbeans, from other third-party. I'm interested only in using some well-designed JavaFX components. How can i integrate? How can i call a JavaFX method? Can i add an existing action or a listener to JavaFX component? In short: developing JavaFX components and integrating them in existing Swing apps. I want to see such samples. Thank you

And something about Java 1.6 Update N if i am correct the Java RE is now started no in the event browser thread so it cannot cause "Freeze" of the browser. But when i try to start big applet like : http://www.uff.br/mapprojections/mp_en.html my firefox 3.0 goes freezed.

I just wonder WHY if I have Java Class and JavaFX class and JavaFX class is binded to some property of the Java Class the value is loaded correctly but if the value of the Java class is changed somehow at the Java class level the update is not performed in Java FX . I hope this will be fixed because its very easy to have thread in Java that do something and will be nice if when this thread updates some values in some model this values to be update in the JavaFX view too.. it will save a lot of work and code.

I would like to see a cool Swing javaFX front end, with javafx binding keyword, JTable and some remote connection maybe RMi, EJB3, REST. An order input form for example... An application that shows me how easy is javafx against writting in plain swing ! :-) (I enjoy swing) Thanks josh, javaFX looks promising and nice to program !

Here is the link to Dslreports.com speed test tools (Flash) ... a JavaFX equivalent will me more then wellcomed ! http://www.dslreports.com/speedtest?flash=1

Hi Josh, Since at JavaOne 2008 were presented some very powerful JavaFX demos (ex: photoflock, 3d Moontank, Connected Life, Video Cloud ...etc) How about to make all them available as source & WebStart/jnlp links ... This will be just a great start covering a lot of JavaFX features !

Hi Joshua, some suggestions: - What about a KDE4 plasmoid (desktop widget) with JavaFX? You are supposed to be able to do plasmoids in Java and you oughta be able to make really cool ones with JavaFX. You could take some JVM performance measurements via JMX and visualize those, for example. - Show cool stuff. Existing demos lack that design edge. Here's the coolest applet I've seen recently: http://wordle.net/. Completely useless, but cool! Typical Web 2.0 stuff. - This would actually be quite useful: Please compare the Flash and Java speed tests on www.dslreports.com. The Java tests are fast and functional, but the Flash meters are real eye-candy. Can you do that with JavaFX (and maybe a servlet at the back end)?

Hi Joshua, What I want is an example of how to use JavaFX from a PowerPC Mac and an Intel Core Duo Mac (32 bit)... ;) Being the Java fan that I am, I want to embrace this over Flex, but I can't as it sits... I still have my trusty two year old MacBook Pro at home and dual G5, and they still work fabulously.

We really need to see how to put some javafx on swing applications, like making a better splashscreen. If we have a jframe, we could make a javafx chat, that you can drag inside the jframe. I think that we have a lot of swing applications, so the start would be to put some pieces in javafx, because we can't afford to throw away all the app and build again just using javafx. I'm really excited with this new RIA direction. And I'm betting on JavaFX because I love Java, Swing. My opinion, mix application swing with javafx. How to start a script from a swing.

I have to agree with the people asking for Swing and JavaFX integration. That's a much easier sell to IT managers than a fancy looking demo with no substance to it. I'd like to see pop-up menu's and JTables. Our good old swing app is full of them.

Hi Joshua,

I have this open source project where I have a web-services backbone, and a frontend GUI. I also have an admin GUI.

We created a FLEX admin GUI because one of the main contributors to this part of the code asked to do that way. It works, it is not complete but works.

So, if you ask me what can you do to help me to consider JavaFx as a good option for the next module, please do the following:

- Get this EAR https://cejug-classifieds.dev.java.net/files/documents/8128/97920/cejug-... - start Glassfish's javadb: asadmin start-database - deploy the ear in your Glassfish. - Then please access: http://localhost:8080/cejug-classifieds-admin

That's it.. that's the application I am producing here.. and if I can include JavaFx in my technology stack, I will be very proud and happy :)

Low priority, if you don't have time or patience to check my project , no problem.. but if you are looking for green grass opportunities to JavaFx :) eheh

I'd propose a two-prong strategy: 1. How to do existing stuff in JavaFX. - CRUD frontend for a database - Video player 2. Inspire with futuristic concepts and demos.

I am interested in building a JavaFX application using EJB3 for database access. I'd love to see a small demo app using these technologies together. Good work, this looks great so far!

@ryanh0, for an exciting cool video app we should just wait for the rich client for Parleys.com, announced by Stephan Jannsen, to be available. They already made a Flex version, so they will be the perfect comparative evaluation with a real world, complex application. In my opinion, Sun should focus on smaller and simpler samples for now. Also because usually the best real world applications come out from third parties, not from the technology provider (this holds for JavaFX as well as for Flex and other stuff).

+1 for integration with existing Swing apps. I think that is the low hanging fruit on how you can get people to start using javafx without committing to a brand new app. Honestly, I don't understand the preoccupation with video. Sure it is cool, but the practicality of writing your own video player is just not there for 95% of developers. Someone will write a nice one that everyone else will just use. Most java developers are in the enterprise application space, not trying to take on youtube.

Josh--I'd like to see some very simple widget-style apps; a Flickr photo slideshow, an eBay auction watch, a Digg postings monitor, something like that. Widget (e.g. Apple OS X Widget) sized, doesn't distract, connects and polls a remote (web) service, and does something more or less useful. Extra points for some way to configure it, e.g. a slide-out configuration panel. That could also be a great start for a contest--ask the community to build 100 variations on that basic widget in 100 days! By the way, I really like the clock tutorial--it looks really good, much better than the old Swing tutorial demo apps. And thanks for asking us! Patrick

"One thing I think people struggle with is mixing JavaFX with Swing" +1

Joshua, A database driven crud example would be nice. This example should demonstrate 1.) deployment of client side artifacts 2.) passing a model from server side java an syncing that up in javafx. Example could make use of webservices or remoting. An example of both would be great. 3.) data validation (client side) 4.) demonstrate basic layouts and components (date picker etc) for building form driven applications I am basically looking for examples that demonstrate that JavaFx can do the same things as flex. Thanks -Serge-

+1 for a video based app

Hi Josh, It would be nice to see a Swing JavaFX integration example so that all Swing developers out there have a clue on how it could be done. At this time I have no clue how to do it. If this is not possible what about writing tutorial or article about that. Thanks, Carl

I would like to see examples broken out into reusable parts like most applications are (or should be) built. This in addition to Swing integration. I got one app I am ready to convert to JavaFX as soon as possible (end of year? fingers crossed). I started it in JavaFX earlier this year but gave up and just knocked it out in Swing.

So what we really want to see is a couple of real apps for the real world, not some toy apps. +1 for a video based app. Maybe connecting to feed for the data. +2 for javafx & swing integration, maybe you could do an address book or a simple mail client (with browser integration for erndering html content). + 3. for multithreading. Also so we don't get people developing slooow feeling java apps. +4. For exporting a Skin from photoshop and developing my sweet looking app quicker! Other suggestions: Building a swing type component in Java FX. How Can I build an awesome looking list / combo / progress indicator ? And lastly a simple 2d game. I think thats it for now ....

"One thing I think people struggle with is mixing JavaFX with Swing" +1 - for instance, a JavaFX using JXMapViewer (I must confess I've only downloaded all the SDK preview stuff, but didn't have the time to try it yet, so maybe it's already there). BTW, I see that people are talking about embedding Swing applications into JavaFX; I'd be interested in seeing the opposite, because you can have a constraint of Swing being the main framework. For instance, if you're using NetBeans RPC. To be more precise, I'd be interested in making a JavaFX "splash screen" for a regular Swing application - think as a starting point the splash screen of NetBeans IDE, with all the aggregated blogs etc... PS For what concerns CSS and Swing, I think Ethan Nicholas has done some interesting work http://weblogs.java.net/blog/enicholas/archive/2008/07/introducing_jav.html I see that aberrant is aware of it since he commented the blog - perhaps you meant something different?

Hi Josh Great job with the sdk . I would like to see some examples and best practicies for how to deploy an application developed with JavaFX sdk like an applet or java web start.

Hi Josh, I would really -no really- like to see some focus on the options you have to communicate with a backend server over the internet, ie using http. Guess that would be using webservices, json for existing services, or RMI for a new app without the overhead ? So that's one more vote for the 'petstore-RIA modern version application, mentioned by ygillet above.

I've said it before and I've said it again : At least give links to the Eclipse resources even if you wont host them. JavaFX looks great but it also looks like it's tied to NetBeans.

I'd like to put in a vote for an example showing how to realize a JavaFX control in a Swing app. I'd also like some discussion of deployment, specifically to platforms eg: OSX that may not support the latest version of java.

kokaku - You know someone really needs to write a look and feel that is configurable by CSS. These CSS for Swing libraries really fight the look and feel and put the control at the wrong level. It would be great if Nimbus (2000?) supported this. Maybe we can get Kirill Grouchnikov to add it to substance (https://substance.dev.java.net/).

Second the vote for mixing Swing and JavaFX, especially from a Swing desktop application perspective. For example, I'm looking at some of the CSS for Swing libraries that are floating around as a way to simplify styling a complex desktop application. Can JavaFX fill that need and how?

Josh, 1. A "sliding tabbed pane" - Only the tabs are visible until you mouse over them and then it slides out to the full tabbed pane. 2. Take a swing app, add a panel that is controlled by JavaFX. 3. Something that combines scaling, rotating and translation with a mouse over. Like the OSX dock effect. It needs to do all three because order is important when applying transforms... right? 4. Non-rectangular windows. 5. Something that does collision detection. Something that bounces because games are a target for JavaFX. 6. Something with more then one file involved. Not everything needs to be done inline.

And, if I'm allowed, one more suggestion.... One thing I think people struggle with is mixing JavaFX with Swing. So, an example that shows how to do the following would be cool... Build a JavaFX GUI that embeds a custom Java Swing class that: o extends a Swing JPanel o has custom painting o has custom event handlers for dealing with mouse/keyboard events, and drag and drop events This would show a couple of useful things: o How to embed a custom legacy Java Swing component in a shiny new JavaFX GUI o How to make sure all keyboard and mouse events end up being consumed by the right part of the GUI. OK - that's enough suggestions from me ;-)

Josh, Judging from the hits I had on my blog in this entry... http://www.psynixis.com/blog/2008/08/03/javafx-video-will-it-be-able-to-... ... I think there's a *lot* of interest in video. One thing that I think would be cool would be a an app that's a little more complex than a super-simple demo. The benefit of that is that it would show people how to put different elemnets together to build a complete system. One idea would be a clone of the YouTube Flash video player. Key features of the YouTube player are: o Play/Pause button o Draggable bar, to show progress of the playing video, and to allow the user to seek backwards and forwards in the video o Show progress of playback in terms of time in minutes and seconds o Volume adjustment of clip o Toggle between playing in a window vs full-screen playback You could make a nice JavaFX tutorial out of this - "How To Build A Video Player". And, of course, if the end result happened to look much cooler than the YouTube player, so much the better! And hey, when JavaFX 1.0 is released, you could even use your handywork on the JavaFX.com web-site to play videos ;-)

Congrats on the hard work you've done guys. What I would really love to see is the petstore-RIA modern version application, or kind of layered application we usually develop in enterprise business world. Particularly, this sample should emphasize on how to use an existing java or any business service layer (EJB3 or REST or any web service) through JavaFX . That way, it would demonstrate how to develop the next killer enterprise application using the best technologies for the task, e.g java for backend layer business services, and JavaFX for RIA sexy client ;)

How about a demo that uses background threads. You know, something that Flash/Flex/AJAX cant do.

Congrats on getting the preview out. I was expecting a bit more jazz but hey, it is finally out. So what about a Twitter client? it has everything you would expect from a desktop/RIA app (xml/json consuming/producing, binding, image manipulation), besides there are dozens of AIR clients and zero from jfx so far. It doesn't need to be as fancy as Twirl nor Twiterrific, it could be similar to Greet (Groovy) or the JRuby versions Charles presented at the Scriptbowl (but please don't make it as spartan as the Jython/Scala entries).