Using Swing in a Servlet

All, Is it possible to integrate Swing objects into a servlet? Specifically, I would like to use the DefaultTreeModel class to build a navigation tree for a servlet. Is this possible, and are there any gotchas to be aware of?Thanks,Justin
[273 byte] By [jgillesp22] at [2007-9-26 1:32:54]
# 1
There aren't any problems with using swing in servlets as long as the virtual machine on your server supports swing.GN
statusquo at 2007-6-29 1:34:37 > top of Java-index,Archived Forums,Java Programming...
# 2

However, don't be under the impression that any visible Swing objects you use will magically appear in the user's browser. They won't. But if you want to build a tree as part of the inner workings of the servlet, then DefaultMutableTreeNode would be sufficient, I think; the only use of DefaultTreeModel would be as the model for a JTree, which would not have any point.

DrClap at 2007-6-29 1:34:37 > top of Java-index,Archived Forums,Java Programming...