I have a simple JTree
, that systematically adds nodes from relevant vars:
public void init()
{
final String section1 = \"JAVA\";
final S
You could put all of the values into an enum and iterate through that instead.
http://docs.oracle.com/javase/tutorial/java/javaOO/enum.html
The solution is very simple:
for (int i=0; i<sections.length; i++) {
selection = new DefaultMutableTreeNode(( sections[i]));
title.insert(selection,0);
}
sections[i] needs double brackets