开发者

Is there a way to render JAVA components/containers in a HTML/XML fashion?

I'm not aware of tools that are being developed for java, but i think it would be a good idea to create an engine that would interp开发者_开发问答ret xml/html-like strings and render them into a tree of container and component objects. Example:

<JFrame title="This is a GUI stand-alone App">
    <JPanel bgColor="blue">
        <JPanel align="center">Some Text</JPanel>
        <JButton align="bottom" value="click" />
    </JPanel>
</JFrame>

Would be equivalent to:

...

ah, I'm not going to write thousand lines of code here, you know what mean!!!


By searching "XML To String" in Google, you can see there are frameworks dedicated to that :

  • SwixML
  • SwingML

I personnaly never used them, but you could give it a try.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜