sebge23
sebge23

Reputation: 301

Java: Create a GUI with XML?

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

Your opinions are needed, thanks!

Upvotes: 16

Views: 35740

Answers (6)

gkns
gkns

Reputation: 720

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

Upvotes: 0

Fred
Fred

Reputation: 1486

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.

Upvotes: 4

thebrianmanley
thebrianmanley

Reputation: 101

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.

Upvotes: 3

Mads Hansen
Mads Hansen

Reputation: 66723

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="[email protected]; [email protected]; [email protected]" 
    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

Upvotes: 7

dmcnelis
dmcnelis

Reputation: 2923

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

Upvotes: 2

Chris Dennett
Chris Dennett

Reputation: 22721

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

Upvotes: 0

Related Questions