import stathelp.StatHelper;
import stathelp.DefaultHelper;
String[][][] firstTree={{{"root",
"country I", null}},
{{"country I", "family A", null},
{"country I", "family B",
null}},
{{"family A", "child 1",
"childA1.html"},
{"family A", "child 2",
"childA2.html"},
{"family B", "child 1",
"childB1.html"},
{"family B", "child 2",
"childB2.html"}}};
String[][][] secondTree={{{"root",
"Science", null}},
{{"Science", "Statistics",
null},
{"Science", "Computer Science", null}},
{{"Statistics", "Applied
Statistics", null},
{"Computer Science", "Design Patterns",
"DesignPatterns.html"}},
{{"Applied Statistics", "Linear Regression",
"LinearRegression.html"},
{"Applied Statistics", "Nonparametric Regression",
"NonparametricRegression.html"}}};
String[][][][] testTreeAttribute = {firstTree, secondTree};
//
Note: HTML files should be put in the directory "C:/resources"!!
helper1
= new DefaultHelper(testTreeAttribute,
new String[]{"Families", "Science"},
"C:/resources");
helper1.setVisible(true);
jf = new JFrame();
jf.setSize(800,600);
desktopPane = new JDesktopPane();
desktopPane.add(helper1);
contentPane = (JPanel)
jf.getContentPane();
contentPane.setLayout(new BorderLayout());
contentPane.add(desktopPane,BorderLayout.CENTER);
jf.setVisible(true);
Results:
