Viewing the Information of a Selected Category
Obviously, you want to do much more than just expand and collapse tree nodes representing the different categories. You may want to display the information about a category when the user double-clicks a particular node. You can enhance the application to detect user events such as double-clicking a node and display information about the specified category.
Detecting Mouse Double-Clicks
You can detect mouse double-clicks a particular component by listening to the java.awt.event.MouseEvent generated by it. You can do this by implementing the java.awt.event.MouseListener interface and the methods defined in it. When a particular mouse event occurs, a particular method of the interface is invoked. ...
Get Java Server Pages from scratch now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.