请指教
代码如下:
if(e.isPopupTrigger()){
int object_id=Integer.parseInt(((JButton)e.getSource()).getName());
Point p=e.getPoint();
jPopupMenu[object_id].show((JButton)e.getSource(),p.x,p.y);
}
代码如下:
if(e.isPopupTrigger()){
int object_id=Integer.parseInt(((JButton)e.getSource()).getName());
Point p=e.getPoint();
jPopupMenu[object_id].show((JButton)e.getSource(),p.x,p.y);
}
其实不一定是没有显示,说不定是被什么东西挡住了!比如你如果在这个菜单显示的地方有一个TextArea or Label等AWT里的构件,经常这样的,
把它们换成swing里相应的构件就没问题了。我也不知道是不是这个原因。:)
QQ,到这个网站去看看吧,在那边还好吧,祝顺利!
主 题:请求各位帮忙,关于绘制图像
作 者:swain
所属论坛:Java
问题点数:38
回复次数:3
发表时间:2001-8-23 9:00:21.....跑后面去了,结分了吧。