Display tree in JTree
Hi, I would like to ask you how can I display my Tree? in JTree?
I create tree:
Folder fol = new Folder(folderName, numFiles);
DefaultMutableTreeNode treeNode = new DefaultMutableTreeNode(fol);
....But now I does not know how to display tree with folder names. When I use tree.setModel(...); it display object, but not folder names...
And how can I use red font color for folder names with 0 files(numFiles = 0)?
Hi, I would like to ask you how can I display my
Tree? in JTree?
I create tree:
Folder fol = new Folder(folderName, numFiles);
DefaultMutableTreeNode treeNode = new
DefaultMutableTreeNode(fol);
....But now I does not know how to display tree with
folder names. When I use tree.setModel(...); it
display object, but not folder names...you need to walk through your tree and create a new DefaultMutableTreeNode for each of your nodes and add to its parent node of your JTree (remember there is a distinction between view and control). the user object of your DefaultMutable TreeNodes is the file/folder, which should be in its own class (see below) and overwrite toString() to return the name. then the JTree will show what you want.
>
And how can I use red font color for folder names
with 0 files(numFiles = 0)?you need a tree cell renderer. it gets your file/folder object (see above) as a parameter. you can query it about the number of files and set the foreground/background accordingly.
thomas
Similar Messages
-
i have a program to convert Xml to tree structure. But i am not able to call it in JSP. So i want to convert to applet. how to convert it.
package TreeGen;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.FactoryConfigurationError;
import javax.xml.parsers.ParserConfigurationException;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
import java.io.File;
import java.io.IOException;
import org.w3c.dom.Document;
import org.w3c.dom.DOMException;
import org.w3c.dom.Element;
// Basic GUI components
import javax.swing.JApplet;
import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTree;
// GUI components for right-hand side
import javax.swing.JSplitPane;
import javax.swing.JEditorPane;
// GUI support classes
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.KeyEvent;
import java.awt.event.WindowEvent;
import java.awt.event.WindowAdapter;
// For creating borders
import javax.swing.border.EmptyBorder;
import javax.swing.border.BevelBorder;
import javax.swing.border.CompoundBorder;
// For creating a TreeModel
import javax.swing.tree.*;
import javax.swing.event.*;
import java.util.*;
import java.applet.*;
public class TreeGen extends JPanel
static Document document;
boolean compress = false;
static final int windowHeight = 660;
static final int leftWidth = 300;
static final int rightWidth = 640;
static final int windowWidth = leftWidth + rightWidth;
public TreeGen()
EmptyBorder eb = new EmptyBorder(5,5,5,5);
BevelBorder bb = new BevelBorder(BevelBorder.LOWERED);
CompoundBorder cb = new CompoundBorder(eb,bb);
this.setBorder(new CompoundBorder(cb,eb));
JTree tree = new JTree(new DomToTreeModelAdapter());
JScrollPane treeView = new JScrollPane(tree);
treeView.setPreferredSize(
new Dimension( leftWidth, windowHeight ));
final
JEditorPane htmlPane = new JEditorPane("text/html","");
htmlPane.setEditable(true);
JScrollPane htmlView = new JScrollPane(htmlPane);
htmlView.setPreferredSize(
new Dimension( rightWidth, windowHeight ));
tree.addTreeSelectionListener(
new TreeSelectionListener()
public void valueChanged(TreeSelectionEvent e)
TreePath p = e.getNewLeadSelectionPath();
if (p != null)
AdapterNode adpNode =
(AdapterNode) p.getLastPathComponent();
htmlPane.setText(adpNode.content());
JSplitPane splitPane =
new JSplitPane( JSplitPane.HORIZONTAL_SPLIT,
treeView,
htmlView );
splitPane.setContinuousLayout( false );
splitPane.setDividerLocation( leftWidth );
splitPane.setDividerSize(1);
splitPane.setPreferredSize(
new Dimension( windowWidth + 10, windowHeight+10 ));
this.setLayout(new BorderLayout());
this.add("Center", splitPane );
//return menuBar;
} // constructor
public static void main(String argv[])
DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();
try {
DocumentBuilder builder = factory.newDocumentBuilder();
document = builder.parse("C:/Program Files/Apache Software Foundation/Tomcat 5.0/webapps/parser1/sample.xml");
makeFrame();
} catch (SAXException sxe){
System.out.println("ERROR");
Exception x = sxe;
if (sxe.getException() != null)
x = sxe.getException();
x.printStackTrace();
} catch (ParserConfigurationException pce) {
pce.printStackTrace();
} catch (IOException ioe) {
ioe.printStackTrace();
} // main
public static void makeFrame()
//JApplet app = new JApplet();
//app.add
JFrame frame = new JFrame("DOM Echo");
frame.addWindowListener(
new WindowAdapter() {
public void windowClosing(WindowEvent e) {System.exit(0);}
final TreeGen echoPanel =
new TreeGen();
frame.getContentPane().add("Center", echoPanel );
frame.pack();
Dimension screenSize =
Toolkit.getDefaultToolkit().getScreenSize();
int w = windowWidth + 10;
int h = windowHeight + 10;
//TreeGen tg = new TreeGen();
//MenuDemo demo = new MenuDemo();
//frame.setJMenuBar(demo.createMenuBar());
//frame.setContentPane(demo.createContentPane());
//Display the window.
frame.setSize(w, h);
frame.setVisible(true);
} // makeFrame
static final String[] typeName = {
"none",
"Element",
"Attr",
"Text",
"CDATA",
"EntityRef",
"Entity",
"ProcInstr",
"Comment",
"Document",
"DocType",
"DocFragment",
"Notation",
static final int ELEMENT_TYPE = 1;
static final int ATTR_TYPE = 2;
static final int TEXT_TYPE = 3;
static final int CDATA_TYPE = 4;
static final int ENTITYREF_TYPE = 5;
static final int ENTITY_TYPE = 6;
static final int PROCINSTR_TYPE = 7;
static final int COMMENT_TYPE = 8;
static final int DOCUMENT_TYPE = 9;
static final int DOCTYPE_TYPE = 10;
static final int DOCFRAG_TYPE = 11;
static final int NOTATION_TYPE = 12;
static String[] treeElementNames = {
"slideshow",
"slide",
"title", // For slideshow #1
"slide-title", // For slideshow #10
"item",
boolean treeElement(String elementName) {
for (int i=0; i<treeElementNames.length; i++) {
//System.out.println(treeElementNames);
if ( elementName.equals(treeElementNames[i]) )
return true;
return false;
public class AdapterNode
org.w3c.dom.Node domNode;
public AdapterNode(org.w3c.dom.Node node)
domNode = node;
public String toString()
String s = typeName[domNode.getNodeType()];
String nodeName = domNode.getNodeName();
if (! nodeName.startsWith("#"))
s += ": " + nodeName;
if (compress)
String t = content().trim();
int x = t.indexOf("\n");
if (x >= 0) t = t.substring(0, x);
s += " " + t;
return s;
if (domNode.getNodeValue() != null)
if (s.startsWith("ProcInstr"))
s += ", ";
else
s += ": ";
// Trim the value to get rid of NL's at the front
String t = domNode.getNodeValue().trim();
int x = t.indexOf("\n");
if (x >= 0) t = t.substring(0, x);
s += t;
return s;
public String content()
String s = "";
org.w3c.dom.NodeList nodeList = domNode.getChildNodes();
for (int i=0; i<nodeList.getLength(); i++)
org.w3c.dom.Node node = nodeList.item(i);
int type = node.getNodeType();
//System.out.println(type);
AdapterNode adpNode = new AdapterNode(node); //inefficient, but works
if (type == ELEMENT_TYPE)
if ( treeElement(node.getNodeName()) ) continue;
s += "<" + node.getNodeName() + ">";
s += adpNode.content();
s += "</" + node.getNodeName() + ">";
else if (type == TEXT_TYPE)
s += node.getNodeValue();
else if (type == ENTITYREF_TYPE)
s += adpNode.content();
else if (type == CDATA_TYPE)
StringBuffer sb = new StringBuffer( node.getNodeValue() );
for (int j=0; j<sb.length(); j++)
if (sb.charAt(j) == '<')
sb.setCharAt(j, '&');
sb.insert(j+1, "lt;");
j += 3;
else if (sb.charAt(j) == '&')
sb.setCharAt(j, '&');
sb.insert(j+1, "amp;");
j += 4;
s += "<pre>" + sb + "\n</pre>";
return s;
public int index(AdapterNode child)
int count = childCount();
for (int i=0; i<count; i++)
AdapterNode n = this.child(i);
if (child.domNode == n.domNode) return i;
return -1; // Should never get here.
public AdapterNode child(int searchIndex)
org.w3c.dom.Node node =
domNode.getChildNodes().item(searchIndex);
if (compress)
int elementNodeIndex = 0;
for (int i=0; i<domNode.getChildNodes().getLength(); i++)
node = domNode.getChildNodes().item(i);
if (node.getNodeType() == ELEMENT_TYPE
&& treeElement( node.getNodeName() )
&& elementNodeIndex++ == searchIndex)
break;
return new AdapterNode(node);
public int childCount()
if (!compress)
return domNode.getChildNodes().getLength();
int count = 0;
for (int i=0; i<domNode.getChildNodes().getLength(); i++)
org.w3c.dom.Node node = domNode.getChildNodes().item(i);
if (node.getNodeType() == ELEMENT_TYPE
&& treeElement( node.getNodeName() ))
++count;
return count;
public class DomToTreeModelAdapter
implements javax.swing.tree.TreeModel
public Object getRoot()
return new AdapterNode(document);
public boolean isLeaf(Object aNode)
AdapterNode node = (AdapterNode) aNode;
if (node.childCount() > 0) return false;
return true;
public int getChildCount(Object parent)
AdapterNode node = (AdapterNode) parent;
return node.childCount();
public Object getChild(Object parent, int index)
AdapterNode node = (AdapterNode) parent;
return node.child(index);
public int getIndexOfChild(Object parent, Object child)
AdapterNode node = (AdapterNode) parent;
return node.index((AdapterNode) child);
public void valueForPathChanged(TreePath path, Object newValue)
private Vector listenerList = new Vector();
public void addTreeModelListener(TreeModelListener listener)
if ( listener != null
&& ! listenerList.contains( listener ) )
listenerList.addElement( listener );
public void removeTreeModelListener(TreeModelListener listener)
if ( listener != null )
listenerList.removeElement( listener );
public void fireTreeNodesChanged( TreeModelEvent e )
Enumeration listeners = listenerList.elements();
while ( listeners.hasMoreElements() )
TreeModelListener listener =
(TreeModelListener) listeners.nextElement();
listener.treeNodesChanged( e );
public void fireTreeNodesInserted( TreeModelEvent e )
Enumeration listeners = listenerList.elements();
while ( listeners.hasMoreElements() )
TreeModelListener listener =
(TreeModelListener) listeners.nextElement();
listener.treeNodesInserted( e );
public void fireTreeNodesRemoved( TreeModelEvent e )
Enumeration listeners = listenerList.elements();
while ( listeners.hasMoreElements() )
TreeModelListener listener =
(TreeModelListener) listeners.nextElement();
listener.treeNodesRemoved( e );
public void fireTreeStructureChanged( TreeModelEvent e )
Enumeration listeners = listenerList.elements();
while ( listeners.hasMoreElements() )
TreeModelListener listener =
(TreeModelListener) listeners.nextElement();
listener.treeStructureChanged( e );
pls help.
ramyaThere's already some applet code in there, although it's commented out. Did you add that?
Anyway, the general principle for turning an app into an applet, is to replace the main() method with the Applet's (or JApplet's) init(), start(), and stop() methods. Also you won't be able to read data off the file system; use resources instead. (e.g., java.lang.Class.getResource)
I'm not sure what this has to do with JSP.
When you post code, please wrap it in [code][/code] tags. -
Hi folks,
I am using a cascaded mapping in my OM. I have a graphical mapping followed by the Java mapping. It is a flat file to IDOC mapping. Everything works fine in Dev but when I transport the same objects to QA, the Operation mapping though it doesn't fail in ESR testing tool, gives the following message and there is no output generated for the same payload which is successfully tested in DEV. Please advise on what could be the possible reasons.
Unable to display tree view; Error when parsing an XML document (Premature end of file.)kalyan,
There seems to be an invalid xml payload which causes this error in ESR not generating the tree view. Please find the similar error screenshot and rectify the payload.
Mutti -
JavaMapping in PI 7.1 Error:Unable to display tree view; Error when parsing
hi,
i get by testing in PI 7.1 (operation mapping) this ERROR:
"Unable to display tree view; Error when parsing an XML document (Content is not allowed in prolog.)"
this is my java-programm-code:
import java.io.FileInputStream;
import java.io.FileOutputStream;
import com.sap.aii.mapping.api.StreamTransformation;
import java.io.*;
import java.util.Map;
import javax.xml.parsers.*;
import org.xml.sax.*;
import org.xml.sax.helpers.*;
/*IMPORT statement imports the specified classes and its methods into the program */
/Every Java mapping program must implement the interface StreamTransformation and its methods execute() and setParameter() and extend the class DefaultHandler./
public class Mapping extends DefaultHandler implements StreamTransformation {
Below is the declaration for all the variables we are going to use in the
subsequent methods.
private Map map;
private OutputStream out;
private boolean input1 = false;
private boolean input2 = false;
private int number1;
private int number2;
private int addvalue;
private int mulvalue;
private int subvalue;
String lineEnd = System.getProperty("line.separator");
setParamater() method is used to store the mapping object in the variable
"map"
public void setParameter(Map param) {
map = param;
public void execute(InputStream in, OutputStream out)
throws com.sap.aii.mapping.api.StreamTransformationException {
DefaultHandler handler = this;
SAXParserFactory factory = SAXParserFactory.newInstance();
try {
SAXParser saxParser = factory.newSAXParser();
this.out = out;
saxParser.parse(in, handler);
} catch (Throwable t) {
t.printStackTrace();
As seen above execute() method has two parameters "in" of type
InputStream and "out" of type OutputStream. First we get a new instance
of SAXParserFactory and from this one we create a new Instance of
SAXParser. To the Parse Method of SaxParser, we pass two parameters,
inputstream "in" and the class variable "handler".
Method "write" is a user defined method, which is used to write the
string "s" to the outpurstream "out".
private void write(String s) throws SAXException {
try {
out.write(s.getBytes());
out.flush();
} catch (IOException e) {
throw new SAXException("I/O error", e);
public void startDocument() throws SAXException {
write("");
write(lineEnd);
write("");
write(lineEnd);
public void endDocument() throws SAXException {
write("");
try {
out.flush();
} catch (IOException e) {
throw new SAXException("I/O error", e);
public void startElement(String namespaceURI, String sName, String qName,
Attributes attrs) throws SAXException {
String eName = sName;
if ("".equals(eName))
eName = qName;
if (eName.equals("NUMBER1"))
input1 = true;
if (eName.equals("NUMBER2"))
input2 = true;
public void endElement(String namespaceURI, String sName, String qName)
throws SAXException {
String eName = sName;
if ("".equals(eName))
eName = qName;
if (eName.equals("NUMBER1"))
input1 = false;
if (eName.equals("NUMBER2"))
input2 = false;
public void characters(char[] chars, int startIndex, int endIndex)
throws SAXException {
String dataString = new String(chars, startIndex, endIndex).trim();
if (input1) {
try {
number1 = Integer.parseInt(dataString);
} catch (NumberFormatException nfe) {
if (input2) {
number2 = Integer.parseInt(dataString);
if (input2 == true) {
addvalue = number1 + number2;
mulvalue = number1 * number2;
subvalue = number1 - number2;
write("" + addvalue + "");
write(lineEnd);
write("" + mulvalue + "");
write(lineEnd);
write("" + subvalue + "");
write(lineEnd);
in developer studio 7.1 i dont get error.
this happens by testing the mapping-programm in ESR.
can somebody help me please?Make sure that the xml created out after the java mapping is a valid xml with only one root node.
Regards,
Prateek -
Display Tree structure using EVS or OVS
Hi All,
Here we have a requirement like display tree structure when I press F4. currently the sample application (using Object Value Selector or Extended Value Selector) is displaying the values in table, instead of table here we have to display it in tree.
If it is not possible using either OVS or EVS please tell me what is the other way to solve the problem.
Please give me any suggestion.
Regards
SureshSuresh,
You can emulate the behaviour by having a separate view for the tree structure.
1.) Create a new view and put your tree structure UI + related logic in that view.
2.) Create an input field and a linkToAction / button (with the text "Search".) aligned side by side.
3.) On click of the search button, show the view containing tree as pop-up.
You may develop upon this hint to meet your requirement.
~ Bala -
Display tree node data in bold characters
Hi,
I have a requirement where I need to display tree nodes data in bold characters. If I click on a particular tree node, next time it should appear in normal font only which means that some task had done using that tree node. Is my question clear??
Plz help me....
thanks,
ravindra.Hi Ravindra,
I think it is possible, i have not done it but let me explain how we can do it.
In <htmlb:treeNode> tag there is an attribute 'text' in
which we specify title of that treeNode.
Now you define a page attribute 'treeNodeTitle' type
edpline and in onCreate assign it value <html><b>MyTreeNode</b></html>
When you click on this node then you do event handling
in onInputProcessing, there assign only 'MyTreeNode' to
treeNodeTitle.
sample code may look like this...
<htmlb:treeNode
id = 'treeNode1'
text = '<%=treeNodeTitle %>' >
</htmlb:treeNode>
Page Attribute
treeNodeTitle type edpline
in onCreate
treeNodeTitle = '<html><b>MyTreeNode</b></html>'
in onInputProcessing
in event-handling code for that treeNode write
treeNodeTitle = 'MyTreeNode'
I hope this will work.
Regards,
Narinder Hartala -
Display Tree Structure in a List / Select Box
I need info on the following
1.display tree structure inside a select/combo/list box.
2.Select a node element from the above tree structure.
Thanks in advanceHave you managed to do this?
Faaiez -
Hi all,
I have a table with follow structure:
ID NOT NULL NUMBER(38)
NAME NOT NULL VARCHAR2(50)
PARENT_ID NOT NULL NUMBER(38)
when i want display tree data, i use sqlplus:
SELECT LEVEL, name FROM tblFruits START WITH id=1 CONNECT BY PRIOR id=parent_id
and get;
LEVEL NAME
1 Fruits
2 Green Fruits
3 Apples
4 Tasty Apples
3 Grape
2 Red Fruits
3 Apples
but if i use a perl script to get too result, i get only 3 level,
#!/usr/bin/perl -w
use strict;
use DBI;
my $dbh = DBI->connect("dbi:Oracle:DATABASE", 'user', 'pass');
if ( !defined $dbh ) {
die $DBI::errstr;
my $sth = $dbh->prepare("SELECT LEVEL, name from tblFruits start with id=1 connect by prior id=parent_id")
or die "Error List";
my ($lv, $name);
$sth->execute
or die "Error List";
while(my @row = $sth->fetchrow_array()){
($lv, $name) = @row;
print "$lv | $name\n";
$dbh->disconnect;
i get;
LEVEL NAME
1 Fruits
2 Green Fruits
3 Apples
2 Red Fruits
3 Apples
i dont get good result, someone can help me please.Have you managed to do this?
Faaiez -
I have to read the contents form an ldif file and display it with in a tree, in that the first dn, should be displayed as root dn, and next as child nodes with all the properties of dn.
I displayed all the dn's but am not understanding how to take root dn and child nodes. please help me if any one know.
Thanks,
RagaHi,
When you delete a node and all of its children, what do you want to do with the grandchildren? If you want to set their parent_id to NULL, do that in a separate UPDATE statement first, then DELETE the original node and all its remaining descendants, as show below.
If, when you say "children", you mean "descendants" (including
children,
children of children,
children of children of children,
and so on, to any level,
) then do a CONNECT BY query to find their primary keys, and DELETE everything in that list, like this:
DELETE subforms
WHERE id IN
SELECT id
FROM subforms
START WITH id = :specified_id
CONNECT BY PRIOR id = parent_id
); -
Display tree hierarchy in adobe print form scenario
Hi
Can someone suggest what is the best way to create a tree structure in adobe print scenario ? can we display icon also next to the text in the tree. For example I want to get folder and file icons also along with their names in hierarchial manner.
Regards
vishalhi,
to populate the dropdown list you can do it...
1). manually or
2). by code
1). <b>manually</b> go to interactive form->edit
go to Object tab->field tab ->
you must see something like
List Items :
Text + x
click on the green + sign...
it promps you to type. type in the value press enter... and so on...
2) <b>by Code...</b>
//set up contents of a drop down list dynamically...
IWDAttributeInfo countryInfo = wdContext.nodeTravelData().getNodeInfo().
getAttributeInfo().getAttribute("DestinationCountry");
ISimpleTypeModifiable countryType =
countryInfo.getModifiableSimpleType();
IModifiableSimpleValueSet countryValueSet =
countryType.getSVServices().getModifiableSimpleValueSet();
countryValueSet.put("1","Germany");
countryValueSet.put("2","UK");
This will work....
regards,
-amol gupta -
Exercise / display tree in JSP
Until recently, I though it was not possible to display a tree
with JSP pages unless using some "external" code [tag,js,etc.] for
generating the HTML.
So I propose you a little challenge:
- display a tree [for example a directory structure starting from a given directory]
- in a nested form
- with no library tags
- without direct use of "out"
- <%= ... %> only allowed to display file names
- with a single JSPwhat you want ommit is all the advantage of the jsp:(()
without those, why people use jsp?My purpose is only to demonstrate that it is possible to display
a nested structure with "simplistic" JSP. So, will you take up the challenge ? -
Jsp code (js code) to display(tree) the files and sub folders in a folder
Hi all
plz can any one send me the source in jsp or js to display in tree structure for files and sub folders in a folder.There are dozens of Javascript tree widgets available on the Internet. Some are free. Some are good. Google will find them for you.
(The only relevance of JSP to your question is that yes, you can generate HTML that uses one of those Javascript tree widgets.) -
Display Tree node label/title on page
I'm using Apex version 4.
I have a tree and I want to display (below the tree) the label or title of the node value that's selected.
So my tree query is like:
SELECT (case when connect_by_isleaf = 1 then 0 when level = 1 then 1 else -1 end) status,
level,
office_name title,
null icon
How can I display the office_name on my report page below the tree? Can I somehow capture the value selected in a page item and then display that page item below the tree?
Thanks.Hi Ravindra,
I think it is possible, i have not done it but let me explain how we can do it.
In <htmlb:treeNode> tag there is an attribute 'text' in
which we specify title of that treeNode.
Now you define a page attribute 'treeNodeTitle' type
edpline and in onCreate assign it value <html><b>MyTreeNode</b></html>
When you click on this node then you do event handling
in onInputProcessing, there assign only 'MyTreeNode' to
treeNodeTitle.
sample code may look like this...
<htmlb:treeNode
id = 'treeNode1'
text = '<%=treeNodeTitle %>' >
</htmlb:treeNode>
Page Attribute
treeNodeTitle type edpline
in onCreate
treeNodeTitle = '<html><b>MyTreeNode</b></html>'
in onInputProcessing
in event-handling code for that treeNode write
treeNodeTitle = 'MyTreeNode'
I hope this will work.
Regards,
Narinder Hartala -
Can we display JTree in top-down form rather than left-right (explorer) form?
Hi,
What web part do you use? Or is it a custom web part?
If there is no such OOTB feature can modify the style, a workaround is using custom CSS code to implement your own custom style for it. With custom CSS, we will be
able to achieve more complex styles.
https://www.nothingbutsharepoint.com/2013/05/02/understanding-sharepoint-csslink-and-how-to-add-your-custom-css-in-sharepoint-2010-aspx/
More demos about how to create table style with custom CSS:
http://css-tricks.com/almanac/properties/d/display/
http://www.creativedev.in/2013/01/table-layout-using-div-tags/
About how to add custom CSS to SharePoint:
http://fitandfinish.ironworks.com/2010/01/the-best-way-to-add-custom-css-to-sharepoint.html
Best regards
Patrick Liang
TechNet Community Support -
Develop UI displaying Tree Using XML
Hi Techies,
I am in the process of developing a UI that should show a tree (not like folder structure).
The tree should start from root node and that may contain n-children and similarly n-levels.
Currently I have a XML file that has the information about the Parent Children relationships.
I wanted to know how to parse this XML and put in the form of UI, the bottom line is, "Developing UI by using XMLfile in Java Code".
I hope I am clear.
Waiting for the reply(ies).
Thanks
- Vikas DKhave two tier architecture... One is View and another one is model&controller
For view use JTree to construct root and show thier children in the form of nodes.
In the model part,use DOM parser to read the XML and store it as a document. From the document read the elements and populate the tree nodes in the view part....
This is a highlevel approach.. ... do u expect any specific implementation details
Maybe you are looking for
-
Hi All, I have configured scenario - Multiple IDoc to File using BPM. I have given the Correlation name, Involved messages, Correlation Container and properties in Correlation editor. While setting the properties of the receive step, I am unable to s
-
Hi well i will have to transform data via FCC. The recieving data e.g. DT_Test has an element with occurence 0..1. because of '0' there is the possibilty that this element will be left blank, so nothing will be transferred. in FCC on receiver side i
-
iso 5 the app store is working very slow, takes about 2 min to search....
-
Hi all, What is field name for Quantity Delivered in SD? Thank you, Shashikanth.
-
Kind of half on and half off topic this, but I don't know where else it should go... Over the years I've created a fair few Apple IDs (usually through forgetting the last one used when registering a new purchase). Is it possible to merge them all int