A Cool MP3 Player at the SwingLabs Exhibit
Iâ€™m at Exhibit #1111, Swing/Labs JDesktop
Network Components (JDNC). Itâ€™s a Sun Microsystems
project that allows experimentation with extensions
to existing Java Foundation Classes/Swing API
components, new JFC/Swing components and various desktop related technologies
like Java 2D, AWT. Iâ€™m talking now with Sunâ€™s Roman Guy, who explains,
â€œWe experiment with a number of projects containing JDNC and
Swing components, all of which sit on top of Swing and add extra features,
like transparency or animation. There are data-aware components that make
it very easy to find data from a database or an XML file, directly to the UI.
You have almost nothing to do -- everything is done for you in the code. You
just choose the source of code and â€“ thatâ€™s it.â€
The source code is available on java.net,
(http://www.java.net/) as part of the LGPL license.
The idea is to explore new ideas in Swing components
that may one day be part of the JDK, like various filtering,
highlighting and searching features. â€œItâ€™s a playground for the
Swing team,â€ explains Guy.
Next to Roman, is Sunâ€™s Richard Bair, operating a SwingLabs
desktop network component demo, who explains, â€œWeâ€™ve created a music
player that reads the music libraries of a very popular music player
and will play any MP3 file that you have in your library. The interesting
thing weâ€™ve done is show off some of the cool features in our Swing X project,
especially the data binding. First, you see the finished project, a nice music
player with â€˜play,â€™ â€˜previous,â€™ and â€˜nextâ€™ buttons and a search field. We have a
lot of music and custom cell renderers and so on. On Thursday, June 30, this will
go public as: joplin.dev.java.net â€“ Joplin, as in Scott Joplin, is the name of our music
player. We have a list of music and a collapsible panel -- you
click a button and the music screen comes down as an animated effect.
As you select different songs, you notice that the title, album, and
artist genre info get updated.â€
The screen displays a cool album cover.
â€œIt looks fancy for a demo, but a lot of it is stock components
from the Swing X project we put to use here,â€ says Richard. â€œWe have a
JX image panel component, which is nothing more than a component that
knows how to extract the image art from an MP3. Itâ€™s pretty simple stuff.
This table is a normal JX table and a little browser that lets you walk
in 3D through all of the album covers in your music library. Itâ€™s all
implemented in Java 2D, very fast. Once you get your song, you can listen
to it. Another screen was written in Java 2D, we call Zoomy; this panel can
be retrieved from another open source project on java.net that is called
ping.dev.java.net. A search field enables you to filter by artist, album,
genre and song. This will be part of James Goslingâ€™s keynote on Thursday.â€
Neat â€“ I got a sneak preview.
Great work! Letâ€™s hope it finds its way into the JDK. And donâ€™t forget Goslingâ€™s
Thursday morning keynote.