读书人

Swing中JToolBar的tooltip有关问题

发布时间: 2012-04-05 12:42:40 作者: rapoo

Swing中JToolBar的tooltip问题
[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的用户手册吧

读书人网 >J2SE开发

热点推荐