Hi there below is the code for parsing xml in java swing now the xml is parsed properly in this is displayed in console but the issue is i have to display it in the new jframe gui with text box in it can anyone out there help regarding the same.
I see that you have posted xml parsing code and some sop statements. You first need to gather this output in variable - so, declare a StringBuilder variable and keep appending to that the needed text.
Then, you have to create a JFrame, have a JTextArea in a JScrollPane and call setText on the text area to have the content printed in the GUI.
If you are new to Swing GUI programming, you can start here
Also, would like to point out 2 things:
Please do not use all caps for the subject - on the net, it is considered as shouting. And also, please UseCodeTags when posting code. I have added them this time for you.
SCJP 1.4, OCMJEA/SCEA 5.0.
Joined: Apr 25, 2013
Thanks For your response will update code and will try resolving the way you have told also will keep in mind when posting next time the caps thing and tags.
keba dev, I added the code tags to your last post. Please do that yourself in the future.
As for where you are going wrong: Ranganathan Kaliyur Mannar suggested you should collect the data from the parser into a StringBuilder. That's still good advice, even though you have not paid any attention to it so far. Hopefully you already know that System.out.println doesn't do that.