首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2SE开发 >

Swing中JToolBar的tooltip有关问题

2012-04-05 
Swing中JToolBar的tooltip问题[codeJava][/code]JToolBar toolbar new JToolBar()toolbar.setFloatabl

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的用户手册吧

热点排行