[code=Java][/code] JToolBar toolbar = new JToolBar();
toolbar.setFloatable(false);
// Insert
URL insertUrl = getClass().getClassLoader().getResource(
"org/jgraph/example/resources/insert.gif");
ImageIcon insertIcon = new ImageIcon(insertUrl);
toolbar.add(new AbstractAction("", insertIcon) {
/**
*
*/
private static final long serialVersionUID = -6458545622185018671L;
public void actionPerformed(ActionEvent e) {
insert(new Point(10, 10));
}
});
如上代码中,如何为工具栏的项加入tooltip???
------解决方案--------------------
读一读Jgraph的用户手册吧