JTabbedPane pane = (JTabbedPane) evt.getSource();  BasicView view = (BasicView) pane.getComponentAt(pane.getSelectedIndex()); MatrixTree currentTree = view.getTree();  for (int i = 0; i < pane.getTabCount(); i++) {  if (!(pane.getComponentAt(i) instanceof BasicView)) continue; MatrixTree tree = ( (BasicView) ( pane.getComponentAt(i) ) ).getTree(); TreePath[] path = new TreePath[1]; path[0] = tree.getCuePath(); if (path[0] != null) { currentTree.startCueMode(path); tree.stopCueMode(); break;
try { JTabbedPane pane = (JTabbedPane) evt.getSource(); BasicView view = (BasicView) pane.getComponentAt(pane.getSelectedIndex()); MatrixTree currentTree = view.getTree(); System.out.println("test"); for (int i = 0; i < pane.getTabCount(); i++) {  if (!(pane.getComponentAt(i) instanceof BasicView)) continue; MatrixTree tree = ( (BasicView) ( pane.getComponentAt(i) ) ).getTree(); TreePath[] path = new TreePath[1]; path[0] = tree.getCuePath(); if (path[0] != null) { currentTree.startCueMode(path); tree.stopCueMode(); break; }
		public void stateChanged(ChangeEvent evt) {			JTabbedPane pane = (JTabbedPane) evt.getSource();			BasicView view = (BasicView) pane.getComponentAt(pane.getSelectedIndex());			MatrixTree currentTree = view.getTree();			for (int i = 0; i < pane.getTabCount(); i++) {				// it might be a JPanel so we need to check to see that its a BasicView				if (!(pane.getComponentAt(i) instanceof BasicView))					continue;				MatrixTree tree = ( (BasicView) ( pane.getComponentAt(i) ) ).getTree();				TreePath[] path = new TreePath[1];				path[0] = tree.getCuePath();				if (path[0] != null) {					currentTree.startCueMode(path);					tree.stopCueMode();					break;				}			}		}