Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8054449: Incompatible type in example code in TreePath
Reviewed-by: aivanov, dmarkov
  • Loading branch information
prsadhuk committed Feb 10, 2022
1 parent 3ce1c5b commit 039313d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/java.desktop/share/classes/javax/swing/tree/TreePath.java
Expand Up @@ -51,8 +51,8 @@
* ...
* TreePath selectedPath = tree.getSelectionPath();
* DefaultMutableTreeNode selectedNode =
* ((DefaultMutableTreeNode)selectedPath.getLastPathComponent()).
* getUserObject();
* ((DefaultMutableTreeNode)selectedPath.getLastPathComponent());
* Object myObject= selectedNode.getUserObject();
* </pre>
* Subclasses typically need override only {@code
* getLastPathComponent}, and {@code getParentPath}. As {@code JTree}
Expand Down

1 comment on commit 039313d

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.