开发者

Java: Create a GUI with XML?

im searching for the most popular framework to create a java gui with xml definitions. I pre开发者_开发问答fer Swing!

Your opinions are needed, thanks!


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:

Java: Create a GUI with XML?


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.


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.


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


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜