开发者

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

开发者 https://www.devze.com 2023-01-29 16:45 出处:网络
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

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

精彩评论

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

关注公众号