Groovy : GUI Builder : creating JTree in Java
I wish to write Java code, but don't like to write swing gui code. I would like to use Groovy SwingBuilder to build the GUI's. But I will be writing everything else in Java.
It is very hard to find good examples of using JTree in Groovy. Anybody that knows some good examples will be appreciated.
And the next step will be how to get this code executed f开发者_Python百科rom Java main class.
Any help will be greatly appreciated.
Paluee
The "Mailer User Interface" on this page shows some JTree code. As Don mentioned Griffon greatly eases the pain of Swing. One thing you might want to consider is that we let you mix Java and Groovy code so you could very easily do the UI bits in Groovy and the logic in Java.
Skarab does make a good point. WindowBuilder is a really good UI WYSIWYG for Java code. Using it to create inner views like JPanels and such makes it possible to use a WYSIWYG AND take advantage of all the application lifecycle goodness that Griffon provides.
Disclaimer: I'm a co-founder of Griffon so I'm not exactly the most unbiased on the matter. A book called Griffon in Action which has my other two co-founders as authors is due to release later this year.
精彩评论