Let's Swing!
A globally warmed, Swing focused blog in the Participation Age.
I've definitely moved this blog to my personal site!

Wrap it around a (J)Tree!

lunes mayo 08, 2006 | Java Swing | Permalink |

I don't mean you have to wrap your car around a tree like this. I'm talking of JTrees and Drag and Drop support.

Inspired by the Swing Hack # 27 (drag and drop in JTrees), I've built a tiny library that automagically provides drag and drop support for those JTrees built using a DefaultTreeModel. As a plus this wrapper eases popup menu handling, performs autoscrolling, automagically expands nodes, does not require the JTree to be extended, cooks the breakfast for you in the mornings and, well, has many other interesting features you may find useful.

More at antonioshome

Playing with JDBM (I)

viernes febrero 24, 2006 | Java Swing | Permalink |
I must admit I like JDBM for desktop applications. It looks extremely strong. And it is very compact. It's runtime weights only 85Kb so it looks perfect for Java Web Start downloads. Since JDBM is based on a B-Tree, it allows only for one key for queries, but this is probably good enough for me. The fact is that JDBM allows for different B-Trees in the same database. It also allows for other indexing techniques, such as hashing, so you can use a JDBM database as a huge hashtable for storing stuff. In this entry I explore the basics of using JDBM, so that I can reference them in further entries. (In the future I'll aggregate all JDBM blog entries into my Links Room). read more

Insistence on desktop persistence

jueves febrero 16, 2006 | Java Swing | Permalink |
I'm afraid I'll insist in lightweight desktop persistence without RDBMS in this entry (and maybe in a few others). I've found some nice B-Tree based storage mechanisms, that seem to be widely used out there. They're being used in NetBeans, blojsom and OpenJMS, for instance.
read more

Persistence in desktop applications

miércoles febrero 15, 2006 | Java Swing | Permalink | Comentarios [5]

Will you bundle a full RDMBS with your GUI applications? How are you persisting the model in your desktop applications? What are the trends in this area? Well. If you build a Swing application that needs to persist your model then you don't probably want your users to download and install MySQL first. Right?

This is the problem I'm facing with the RSS feed reader I'm buildling. I want to store all the RSS feeds somewhere and be able to search them. Stuff there should be indexed. That easy. Easy? Or not?

read more

2927 JNLP applications, wow!!

lunes diciembre 19, 2005 | Java Swing | Permalink | Comentarios [1]

I've seen at JavaHispano that somebody has grouped a total of 2927 JNLP applications in a single page for you to run. Check it yourself. (lots of games, too). Impressive!!!

Survey: Your preferred Swing Eye Candy?

miércoles noviembre 23, 2005 | Java Swing | Permalink | Comentarios [2]

I was wondering what your preferred Swing application is. Please add a comment with your preferred one.

Thanks!!

Antonio

Swing Eye Candy

lunes noviembre 21, 2005 | Java Swing | Permalink | Comentarios [2]

I've seen some Swing applications that have really impressed me. And I wanted to tell you all so that you can enjoy that eye candy as well.

First one is Sun Java System Creator. There's an IMPRESSIVE and funny flash demo here.

Note that, since Sun Java System Creator is based in NetBeans 5.0 (beta 2 released recently, by the way, and it's really cool), most of the kudos should go to the NetBeans people. (Hint: go through all the demo and then wait a few minutes after it's done. I couldn't stop laughing!)

Second one is a Graph Editor you can Java Web Start from the yWorks site. It has an interactive hierarchical layout that has indeed impressed me. Cute app.

I'm presenting XML and Java/XML at a local University in Madrid in a few days so, yes, I have to go back to work.

Grrrr, ;-)
Antonio

Graph drawing with NetBeans

jueves noviembre 10, 2005 | Java Swing | Permalink | Comentarios [3]

One of my interests is graph drawing. Graph drawing is a nice mixture of maths and computer science.

The fact is that drawing a graph automatically is indeed a complex thing. I am specially interested in drawing directed graphs, either cyclic or acyclic ones.

One of the most famous algorithms for doing this is the Sugiyama algorithm, that I'm slowly implementing myself as time permits.

One of the most famous tools for automatic graph drawing is Graphviz. There're different commercial libraries for drawing graphs, too. JGraph has recently included some layout algorithms (that, by the way, failed to work in the demo I tried several months ago).

So, why am I telling you all this? Well, because some guys at Sun have contributed a graph library to NetBeans. And, although it seems not to have an algorithm to layout nodes, it does have an algorithm to automatically route edges (quite effective, indeed). It seems this is the library being used to display those nice graphs in NetBeans Mobility Pack, like this one:

Sample Graph built with the NetBeans graph library

So I thought you could be interested in trying out the Java Web Start demo available at that page. Cool stuff.

And, by the way, there're some nice screenshots here of applications built on top of the NetBeans platform, just in case you want some eye candy.

Cheers,
Antonio

Update: The NetBeans Graph library does have an algorithm for automatically laying out nodes too.

Book on Swing?

martes noviembre 08, 2005 | Java Swing | Permalink | Comentarios [7]

I've been traveling to Sevilla lately and so it's hard to keep on blogging. I beg your pardon. I'll write on the EventBus by the end of the week.

The fact is that a friend of mine is thinking of buying a book on Swing.

I bought a book on Swing ages ago. At that time Swing was prefixed with "com.sun.swing" or something similar, and was not yet integrated in the JDK.

Since then things have changed a lot (I can travel on a high speed train to Sevilla, for instance ;-)). So I thought it would be a good idea to ask you what you think.

Would book would you recommend? Do you know about a good book on Swing? Or, even better, would it be a good idea to write just another book on Swing? If so, which topics would you like to see covered? Is it threading? API? JDNC? JDIC?

All advice will be greatly appreciated.

Cheers,
Antonio

Extending javac with annotations...

miércoles octubre 26, 2005 | Java Swing | Permalink | Comentarios [4]

Oh, my. This is so sweeeet. Imagine you can plug-in your annotation processor within javac. And then recompile the generated code. This is impressive.

The possibilities of this feature are immense. Take for instance EJB 3.0. You annotate your EJBs and your Web Services. Then some source code (remote interfaces, home interfaces, WSDL, etc.) is generated for you by annotation processors. And then this generated source code is compiled too.

For we enjoying Swing things may be easier, too. We may end up writing things like this:


@actionPerformed( ActionListener="myButtonActionPerformed" )
JButton myButton;

...

@ActionListener("myButtonActionPerformed")
private void whatever( ActionEvent actionEvent )
{
  ...
}

This, we could annotate listeners and then recursively generate new source files and class files, generating and adding anonymous action listeners at compile time.

Quite impressive, indeed. Now, don't you think annotations are the Next Big Thing in Java?

Cheers,
Antonio

What next? (I want you to participate)

domingo septiembre 11, 2005 | Java Swing | Permalink | Comentarios [9]
I want you to participate. I think I'm done with the SwingWorker entries, so I will post a summary during this week to condensate all recommendations (and some third-party interesting links too). So I'm thinking on what to do next. And I want you to participate.

I don't have too much spare time to do open source, but I am thinking of spending a little bit of time on a new one. Since we are in the Participation Age I thought it could be a good idea to share my ideas with you so that you can influence me. And I want you to participate. Please. Do me that favour. At the moment these are my suggestions:

  • Build "BeanInfo" for all those beans at the JDNC Swingx project. That way we will be able to use Swingx components in our preferred GUI builder (mine is NetBeans, I assume Eclipse's VE will accept third-party external JavaBeans too). I need to talk to JDNC people in advance to verify nobody is working on it, so that there's no duplication of effort.
  • Build some sort of little "Task Manager" to visually appreciate all those running SwingWorkers in the background, otherwise invisible. Something similar to the "Download Manager" window of Mozilla or Firefox, that shows all running (or finished or cancelled) operations and their progress.
  • Build a little application that reads graphics files (PNG, JPG and the like) and is able to do some simple transformations on those, using Java2D. I need something like that so that my father (that runs Linux) doesn't have to fight GIMP 2.2 (which is really unusable).
So, what do you think? Which of the above is your preferred one? Have you any other cool idea you could suggest? I want you to participate! Please send me an email or write a comment with your preferences and or suggestions. I will greatly appreciate those.

Thanks in advance,
Antonio

Steve on SWT

viernes junio 17, 2005 | Java Swing | Permalink |

Wow. Keeping a blog it's hard. I'm too busy to post lately. I'll try to correct that in the future. Please accept my apologies.

Just wanted to point out a recent interview with Steve Norhover. This guy is one (the) father of SWT.

I attended a conference by Steve last year at JavaONE and found it quite interesting.

Of course I understand SWT is tough to maintain, but I promise taking a look at it in the future (as soon as I find a good tutorial on SWT).

Oh, by the way, I've enabled comments back to this blog. We have an interesting spam-blocking mechanism.

Getting High Performance from Your Desktop Client

martes febrero 15, 2005 | Java Swing | Permalink |

Come on!!! The SDN chat session on High Performance from your Desktop Client is about to start!!!

Ole Jose, and swingworkers

jueves noviembre 18, 2004 | Java Swing | Permalink |

Long time no see. I know I've been quiet for a long time.

Olé José Femia is blogging too

I wanted to welcome José Femia to blogs.sun.com. Nice to seem another spanish posting. Good stuff. Welcome, Jose.

SwingWorkers

I've been reviewing SwingWorkers lately. Too ugly for my liking. Somewhat difficult to use. I've been learning/playing with the new concurrent utilities in JDK 5.0. Oh, my, we needed those!

Taking advantage of java.util.concurrent.Future and playing a little bit with java.util.concurrent.ExecutorService I've built two classes that use a thread pool to process tasks out of the Swing thread. I'm still polishing the thing a little bit. I'll be publishing those in sourceforge and/or java.net so that everybody can use them too.

Under the LGPL, of course ;-)

I'll post here whenever the thing is ready. Have a good surfing meanwhile.

SWT, JGoodies and Synth: My preferred desktop sessions at JavaOne 2004

domingo julio 04, 2004 | Java Swing | Permalink |

I attended as many desktop-related sessions at JavaOne as I could. All of them quite interesting. The sessions I liked most are (no special order here):

Steve's session on SWT clearly stated what all SWT is about: performance and native look. Maintainability was not an issue for them (well, they are supporting different code for each OS, that's a huge task I think). In fact SWT achieves both goals. So no doubt: SWT has been successful in its goals. I'll blog on Swing and SWT one of these days.

Karsten's session was impressive. He presented examples of JGoodies Looks and JGoodies Forms and even the validation stuff (you can find these at javadesktop.org). I once built my own Look and Feel with antialiasing rendering of fonts on Linux, but listening to Karsten I understood that building a good Look and Feel is much more complex than one may think initially. The Looks L&F takes care of screen resolution, for instance, and that's something I've never thought of while Swing-ing.

I pursued some of the Netbeans people around too. Netbeans 4.0 just rocks. You can drag and drop windows around. It starts-up quite fast as well (they had a session on startup performance). I would like to start developing on top of Netbeans but documentation is still an issue. I will try to go fetch some good tutorials as soon as I have some spare time. If you know about any good starting points just let me know.

Scott Violet's session on Ocean and Synth was quite clarifying too. Ocean is just an improvement of Metal, to make it look a little more modern while keeping pixel-size backwards compatibility with Metal (and performance too). So it's not that spectacular to me. Synth is much more promising: you can build L&Fs quickly by just choosing the images you use for rendering widgets or by providing a single class (SynthPainter) to centralize the painting of all widgets. That's much more flexible than Ocean and Metal, and I see that as a step forward in improving Swing. It seems there're still performance issues for Synth (such as advanced image caching), but these will be on time for the final JDK 5.0. Cool.


Categories


Search


Recent entries


Sites I find interesing

Aggregators
Swing focused
Software architecture related @ blogs.sun.com

Calendar

« noviembre 2009
lunmarmiéjueviesábdom
      
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
      
Hoy

Navigation


Visits

Locations of visitors to this page