Monday Jul 06, 2009

JavaFX on Swing, Swing in JavaFX


To a large degree JavaFX is designed with a new generation of developers in mind, those with a little more art than science in their backgrounds. More into shifting shapes on screen than polymorphism in code. And they may well be wearing skinny jeans for the first time, unlike the Janitor who was pioneering them in the 1980s.

But for Swing developers who have art and science in equal measure, JavaFX is a great companion to add to the portfolio.

Original team member Amy Fowler blogged recently about how to use JavaFX to make over an existing Swing application.

And with the latest release of the JFXtras, a handy suite of goodies for JavaFX development, comes the new JavaFX wrapper for Swing components, as you can read all about here.

Wednesday Apr 22, 2009

JavaFX: Bring life to the scene


One cool thing about JavaFX animation is animating along an arbitrary path: so it was good to see Josh posting a Curve editor in JavaFX, to ready-make a CubicCurve to use for the animation path of something you want to bring to life in a scenegraph. It was a bit like Jasper's JavaFX spline editor, which gives a real-time view of how a keyframe animation in JavaFX is going to look. Some tips for the design tool team, Norbyemaybe ?

And did you see yesterday's article on deploying Swing and JavaFX applets ? A step by step walk through of how end-users are going first to experience your JavaFX/Swing app. On a variety of browsers, and depending on whether they already have the JRE installed. You can see why Java Auto-Update is so important, even if the install process got even more simplified.

Wednesday Apr 15, 2009

Swing, ImageUploader, Trees


A cute little newish project you may not have seen is the ImageUploader project over at java.net. Its a cross-platform Swing application (screenshot) for selecting images to upload, as the name hints at, complete with drag and drop from native file explorers, roll-over effects, image preview. When the time comes up upload multiple files, it POSTs them over to a URL, complete with reassuring progress indicators. Its under BSD, and even the Janitor could easily check the repo, compile it in NetBeans and have it running within minutes.

Nice, especially as an applet, if you need image upload on your website.

Of course it has a customized version of JTree. Something not commonly available on mobile phones, unless of course, you include LWUIT in your application, in which case, its relatively easy to build down off the LWUIT composite Container model and build your own, as you can see explained in detail here.

Monday Mar 30, 2009

Planet Cast Two: James Gosling on Java and JavaFX


Tune in to the second in the Planet Cast podcast series with a conversation (~35 mins) with James Gosling all about what get's him excited, starting with an impromptu poety reading, but mostly all about what's going on in with Java and JavaFX.

From Garbage First, through modularity in Java, multiple languages, Swing and JavaFX, this is a must listen episode from the man who started it all.

Listen or download here. (Friendlier means coming soon).

Wednesday Mar 25, 2009

JDK 7: What to expect and when


Today, Mark posts a major update to the plan for JDK 7 reiterating the feature list first announced in December, and providing a milestone by milestone plan for when to expect each of the new features to make it into the builds for you to try out.

We're currently at milestone M2, which includes the new G1 garbage collector (with some new bug fixes) and JSR 203 aka New IO APIs 2.

There should be a nice package to play wth in M3 in time for JavaOne, which will add JSR 292, with the Java language changes in Project Coin and Swing App Framework coming by fall this year.

There are some features in the feature list that have not yet been scheduled into the plan (like the modularity work in Project Jigsaw) but stay tuned, because they will get pegged to a milestone soon.

Monday Mar 02, 2009

JDK 7: Language, the penny drops, Swings back


Small changes to the Java language can have a powerful effect. How many of us remember Java SE 5 as the release that included the for each loop ? Sometimes, the biggest doors are opened by the smallest keys.

As shown in number of informal polls a large number of ideas have been rattling about in our pockets for some time, but now the formal call for proposals for small language changes for JDK 7 is open for the whole of March, as Joe announces. And you can see the proposals (see this, for example) are already tumbling into the slot of the Project Coin mailing list and the subject of detailed discussion.

And, in other news, Alex just posted an update on where things are with the Swing Application Framework, and is looking for input on some remaining issues SAF could solve for JDK 7.

Thursday Feb 26, 2009

Java ME, Java SE, JavaFX from the horse's mouth


As you probably know, there's a growing number of regular podcasters on various aspects of the Java Platforms. A great way to stay on top of what's going on in the Java world, and hear a few stories you might not see written down.

Like the latest episode of the Java Mobility Podcast, where Terrence and Roger do a great in depth interview on the new Java ME SDK, in early access. You probably know that it's the single, unified successor to today's two SDKs, one for CLDC and one for CDC app development. So it brings together all the APIs, tools and emulators for development for apps on anything from a mass-market phone to a Blu-ray disc. Simpler is definitely better, and this new consolidated SDK also includes a new, optimised CLDC runtime, a new runtime profiling tool (based on the one used in VisualVM), on-device debugging, and LWUIT support.

On the JavaFX front, the JavaPosse interview of the JavaFX team at Devoxx (including the back story on how the launch-day glitches on javafx.com got fixed), and Josh's recent, detailed interview all about JavaFX 1.1 on the RIA weekly with Cote.

And just for fun, try the recent This Ain't your Dad's Java cast (here, or here) our highly caffienated uber-geeks-turned marketing-execs-gone-wild talk on a variety of topics, including Swing versus JavaFX, Java SE 6u12, and the inside story on the winding road to release for JavaFX Mobile.

Wednesday Feb 25, 2009

JDK 7: Checking in


Whether or not you are coming to JavaOne this year, you should count having a preview of JDK7 ready for you to try. So let's check in on where the larger features on the plate are at since Mark talked about JDK7 at Devoxx in December. (And since Alex gave one of his updates).

Modularity work is progressing with proposals up for comment in Project Jigsaw.

Good stuff coming in the VM with the support to turbo-charge Java SE for multiple languages, and the new garbage collector, which made it into the latest build of Java SE 6u14.

Though not enough for some Swing developers (who might be interested in this project), we'll bring some important improvements to Swing.

Java language-wise, Joe is sifting through the small Java language proposals as part of Project Coin. Opinions still welcome. And you check out the project that will add annotations to (all) Java types by trying out the latest Checker framework.

NIO2 is tuning the new APIs for scalable IO, including the new FileSystem API, which you can get in the latest build.

Wednesday Feb 04, 2009

Swing and JDK 7


Prompted by a vigorous discussion on Jonathan Giles blog about whether Sun is ready to do a 'Swing 2.0', its time to lay out where we (at Sun) are with Swing. So here it is.

Swing and Sun

Swing is really important to Sun. We have a large and vibrant group of developers who are developing and maintaining Swing GUI applications. Its APIs, components and underpinnings are critical to Java's future position in developing rich client applications of all kinds.

In contrast to the early years of hectic build out of Swing, we've slowed the growth of APIs over the last few years. This is largely because, despite gaps in the API set for some applications, compared with those early days (or with JavaFX today), the Swing APIs are broad enough to build most enterprise desktop applications. And that which is not there can most often be added with a third party library or component.

Building with Swing. Building on Swing

At the same time we've also seen a growing role for Swing, and its underlying graphics runtime, as a basis or inspiration for other RIA technologies. Such as our own JavaFX, which uses both graphics stack and many of the Swing components in its desktop profile, or such as Griffon, Thinlet, Pivot and LWUIT to name but a few.

So our focus has been shifting (starting well before the advent of JavaFX, even of Java SE 6) from filling out what were then major gaps in Swing as a UI toolkit, to making it easier to develop with Swing, and to making the runtime deploy and perform better. Progress on both counts are a benefit to Swing developers but also to other technologies that depend on Swing and its foundation.

Sun's priorities for Swing and JDK 7

To that end, the priorities for our effort between JDK 6 and JDK 7 are: first to make the runtime lighterweight (faster download, faster startup), better integrated into the browser, and with improved runtime performance. Some of this we have already delivered in Java SE 6u10, but there is more to come. And second to take a big swing (!) at reducing the amount of boilerplate code and conceptual complexity in a developing typical swing application with the Swing Application Framework in JDK 7.

We've also set things up in OpenJDK to make it easier for developers outside Sun to contribute to Swing, and we hope to help integrate some backwards compatible features created outside Sun into the JDK. We'll be working with the XRender pipline team to bring graphics acceleration to Java on Unix platforms. Also in JDK 7 we'd like to include other components such as JXLayer, the DatePicker, and CSS styling also. And perhaps other components or features, as mentioned in some of the comments in the thread, all such contributions depending on the usual constraints of quality of implementation, accompanying tests and of course, timing.

On a related note, some have mentioned a desire to use JavaFX features from Swing: we're interested in hearing what kind of Swing applications you are writing that might require JavaFX components to be embedded as we figure out the next releases.

Not ready for an incompatible revolution

Now, some of the discussion at Jonathan's blog reminded us of the many areas in the APIs that need updating: largely because of the advent of new Java language features and SE APIs that were added after the Swing APIs were created, that now provide much more convenient and reliable ways to manipulate Swing than were possible before. But we have a more conservative attitude towards breaking backwards compatibility than some of the commenters on the thread (and beyond): an attitude formed out of years of talking with developers and customers who depend on Swing. (As an aside, you may be curious as to the inherent design issues regarding the EDT). Now JDK 7 modularity will likely provide a neater way to move gracefully to some possible future backwards-incompatible version of the Swing APIs. But in terms of where we put our effort today, we don't think such an evolutionary cleanup, albeit useful and desirable, its enough reason to disrupt existing applications, tools, books, tutorials, courses and frameworks that are built with today's Swing.

Are you ?

But if what you want is revolution not evolution, if you would like to see bigger, more radical changes inside Swing, then please consider that you have all the source code for Swing together with the supporting infrastructure to create a project and broadcast its existence at OpenJDK.org.

It's why, in part, we set up OpenJDK: to make it easier for you to bring the next big RIA idea to life.

Friday Jan 23, 2009

Java SE: Draggable Applets and OpenJDK


One of the most popular features of the recent Java SE 6u10/11 releases was the new browser plugin architecture. Java Applets (or JavaFXJRuby, Groovy...applets) get their own VM, external to the browser process in which to execute. Meaning that applets have a more independent existence: they can choose their own VM parameters, and live beyond the lifetime of the web page they came from. Maybe that's why 78 million people downloaded it in December ?

A browser plugin does not have to be part of every Java SE implementation because the Java SE platform is not required to run in browsers. Nevertheless, as Joe announces, the team has decided to make the code part of OpenJDK so that the new features get supported in Linux and Mac too.

And, other good news about Java SE is that Jonathan Giles has signed up to take over Kirill's Swing Links of the Week. Definitely one to track for GUI programmers.

Monday Jan 12, 2009

Big, Faceless, Draggable Java Swing Applet


Most of you thought the Consumer JRE (aka Java SE 6u10) would exceed 70 million downloads in the first month of its consumer release, and the Planetarium will tell you who got it right this week, when all the data is gathered from the Java Update push (in fact of 6u11 = 6u10 + bug fixes) which started in the first week of December.

So its interesting to see commercial apps picking up on the new runtime and deployment features in the JRE. Like the PDF Viewer from BFO. You can see a video of it being dragged out of the web page here, but this blog entry outlines the other features it uses, like control over the heap size, and how to make the desktop shortcut to it.

Or just run it yourself here (Alt-Click to drag the applet out).

Its also a great example of the kind of 'traditional rectangular' GUI for which Swing excels.

Monday Sep 15, 2008

Swing Steps


Today, news for devotees of Java Swing.

The SwingX project, an incubator for new components that may show up in the Java SE platform in he future has reached another milestone, so its a good time to check that out.

Also an interesting posting today on using the new Resource Framework piece of the ongoing Swing Application Framework API, slated for JDK 7. I hope there will be a part 2 and 3 that will cover the new way to use resource injection to completely separate out not only component property values but the mechanism to initialize them too.

Swing is powerful and got a new look and feel called Nimbus in the upcoming Java SE 6u10 release...but you know Swing's not only in Java SE, right ? Its been formally subset as AGUI for high end Java ME devices and JavaFX desktop profile is using some of its popular components, as is LWUIT for smaller Java ME phones. And some \*really\* cool apps are using it on Facebook.

Just a few other places Swing's swung.
About

A blog all about Java in all its flavors on all client platforms from smartcards to desktops and everything inbetween.

Search

Categories
Archives
« July 2015
SunMonTueWedThuFriSat
   
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
       
Today
Feeds