toolsMenu.add(new AbstractAction("Hello World!!!") {
public void actionPerformed(ActionEvent e) {
JOptionPane.showMessageDialog(frame, "Hello World!!!");
}
});
dockedTypeDescriptor.setToolWindowActionHandler(new ToolWindowActionHandler() {
public void onHideButtonClick(ToolWindow toolWindow) {
JOptionPane.showMessageDialog(frame, "Hiding...");
toolWindow.setVisible(false);
}
});