This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
public void mouseClicked(MouseEvent e) {
tree.stopEditing();
int selRow = tree.getRowForLocation(e.getX(), e.getY());
if ((selRow != -1) && SwingUtilities.isLeftMouseButton(e) && MouseUtils.isDoubleClick(e)) {
// Default action.
if (defaultActionEnabled) {
} else {
tree.expandRow(selRow);
}
} else if (selRow == -1 && SwingUtilities.isLeftMouseButton(e)) {
int row = e.getY() / tree.getRowHeight();
if (row < tree.getRowCount()) {
tree.setSelectionRow(row);