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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.