16

im searching for the most popular framework to create a java gui with xml definitions. I prefer Swing!

Your opinions are needed, thanks!

sebge23
  • 191
  • 1
  • 2
  • 9
  • I have been using Swing for about 5 years and would also prefer using it over anything else. – Jim Mar 06 '11 at 22:22
  • 2
    See [suggestions for declarative GUI programming in Java](http://stackoverflow.com/questions/761237/suggestions-for-declarative-gui-programming-in-java) – Jonas Mar 06 '11 at 22:45

6 Answers6

7

I have had good experience with ANTForm: http://antforms.sourceforge.net/.

It generates Java Swing panels from XML. I have used it to build simple GUI apps that execute ANT targets.

Example of the XML declaration:

<antform title="Send Mail" 
    save="properties.txt"
    image="doc/images/testlogo.jpg">
    <label>To send a mail, use the following form. Pick a recipient,
 type a subject and a body...the script will do the rest.</label>
    <selectionProperty label="Recipient: " 
    property="recipient" 
    values="address1@somewhere.com; address2@somewhere.com; address4@somewhere.com" 
    separator=";"/>
    <textProperty label="Subject : " property="subject" />
    <multilineTextProperty label="Message body: "
        property="body"/>
    <booleanProperty label="Send immediately: " property="send"/>
</antform>

Example of what it produces:

enter image description here

Mads Hansen
  • 63,927
  • 12
  • 112
  • 147
4

I would suggest checking out FXML there is a neat tool made by oracle which can be used for making GUIs the following are some good links to get started.

http://docs.oracle.com/javafx/2/fxml_get_started/jfxpub-fxml_get_started.htm

http://docs.oracle.com/javafx//scenebuilder/1/get_started/jsbpub-get_started.htm

You don't need to use the SceneBuilder tool but it makes things very easy when creating a gui using FXML.

Fred
  • 1,486
  • 1
  • 9
  • 6
3

I don't know if there are any popular frameworks out there for Java, but you might look at XUL which is what the Firefox UI and its plugins use.

There are some Java-based engines to render XUL (using Swing), but I'm not sure what state they are in.

E-rich
  • 9,243
  • 11
  • 48
  • 79
2

I used Apache Pivot http://pivot.apache.org/ and really liked it.

dmcnelis
  • 2,913
  • 1
  • 19
  • 28
0

Jaxe is something which I have used for the same. But not sure if it is maintained now.

gkns
  • 697
  • 2
  • 12
  • 32
0

Have a look at SWT and SWT/XML or SWIXML for Swing.

Chris Dennett
  • 22,412
  • 8
  • 58
  • 84