views:

221

answers:

3

Is there a free decent java GUI descriptor language (probably XML based), which has a Glade-like (WYSIWYG) GUI builder?

A: 

Sorry this is prob not the answer you were looking for but have you looked into using flex? The markup in Flex is all XML based and the builder is very good.

Blaze DS can then be used to communicate between flex and Java.

Dont know any pure xml layout frameworks off the top of my head. Whats your reason for wanting an XML based UI?

Karl
Separating the UI layout from the code seems to be a good idea (look at gtk with glade, windows with WPF...).
pihentagy
+3  A: 

Netbeans IDE. Whenever you use its GUI editor, it stores the GUI in XML, in a *.form file.

For example if your create a class com.some.package.MyForm which extends some Swing component or window, look for this file $SRCDIR/com/some/package/MyForm.java and $SRCDIR/com/some/package/MyForm.form.

The former is the actual Java class that gets compiled. The latter is a file that Netbeans uses to store the GUI in XML format. This is what netbeans uses to generate the auto-gen'd code that goes in the code fold to initiliase the GUI.

HTH


Edit:

I do acknowledge that the Netbeans IDE probably isn't the best one out there, and I personally use it only because it's already built into the IDE that I use anyway. For me it gets the job done, and I may sometimes have to manually apply tweaks in the code to get what I want. It's a no-frills, XML-based, Java GUI, WYSIWYG editor.

bguiz
For pure swing, GridBagLayout is the only usable layout manager for me. And inserting a row on the top of the table was impossible (I had to move every component one-by-one.
pihentagy
A: 

Simple googling yields me many like http://swingml.sourceforge.net/, http://jfcml.sourceforge.net/,http%3A//cookxml.yuanheng.org/cookswing/etc.

You can try JavaFX, it is too a cool DSL way of representing the Swing components and it provides more of its own for API for animation and graphics usage. Netbeans and eclipse have plugins/extensions to do DnD development for it.

swingml, jfcml, cookxmlFine, but is there a WYSIWYG editor for those xmls?
pihentagy
Just stumbled on https://abeille.dev.java.net/