I have an array of JTree nodes and a corresponding array of another custom object.
What I want: When a node of the JTree gets selected, fields of the corresponding object (object of the same index in its array as the index of the selected node in the nodes array) to fill JLabels.
Where am I stuck: The TreeSelectionListener. I have no idea how to get the index of the chosen node in its array.
Is it possible at all? Any ideas?