My requirement is that i have to create an UI which contains two frames one on the left and one on the right.The left frame should display various nodes using JTree.Now when i click on one of the nodes of the tree,the right frame should display an xy plot using JFreechart based on the node selected.Separately i am able to make a Jtree having various nodes and a JFreechart of xy plot but together in a single window is it possible?Pointers to the same would be appreciated
That's easily possible. You'd use a layout that can place components next to one another horizontally, like BoxLayout or GridLayout. Then you add two JPanels to that layout, which you can fill with whatever content you want (or add the JTree and JFreeChart components directly, without an intermediate JPanel).
Now what i am doing is i have created file menu which contains "Open" and "Exit".Now if i click on the open button ,i will select an xml file and that xml file is to be loaded as a JTree.Without the file menu ,directly i am able to load an xml file in a JTree( in a separate program).What to put in the actionlistener part while clicking the "Open".Please help.
I'm not sure what you're asking. Obviously, there needs to be code to get the filename (that'll involve a JFileChooser), and then you need to parse the XML (probably using a SAX parser through the JAXP API) and build up the JTree during parsing. If you're unsure about any specific step, tell us what you have so far, and where you're stuck making progress. Note that XML questions should go into the XML forum.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop