Posted by
ctrueden on
May 05, 2011; 5:43pm
URL: http://imagej.273.s1.nabble.com/Converted-from-AWT-to-SWING-now-mouse-doesn-t-work-tp3684632p3684633.html
Hi Robert,
For our senior design project, we are converting ImageJ to use SWING instead
> of AWT. We have changed the most important GUI files, but now the mouse
> cannot click on the menu items.
>
How bizarre. You are not the first group to convert ImageJ to Swing, and no
one else has reported a problem like this, nor could I find anything in a
cursory Google search. So chances are there is something unusual about what
you have done. One thing you could try is mixing AWT and Swing
components—i.e., keep using the AWT MenuBar and see if that works for you.
Alternately, you could try calling
JPopupMenu.setDefaultLightWeightPopupEnabled(false) and see if that makes a
difference. My only other thought would be to look for anything that is
listening for mouse events and then consuming them, or a subclass overriding
a MouseListener method and not calling super.mousePressed, etc.
As a side note, please be aware that ImageJ 2.0, due out in October, will
feature a Swing-based user interface.
Regards,
Curtis Rueden
ImageJDev project lead
http://imagejdev.org/On Wed, May 4, 2011 at 4:15 PM, liquidnitro28 <
[hidden email]>wrote:
> For our senior design project, we are converting ImageJ to use SWING
> instead
> of AWT. We have changed the most important GUI files, but now the mouse
> cannot click on the menu items.
>
> You are able to click on things, like File, and the drop down menu will
> show
> up but if you click on something like Open, nothings happens.
>
> We can still open files by pressing the "O" key, but not with the mouse. We
> think it is a problem in Menus.java, but we aren't exactly sure.
>
> If anyone has an idea of what is happening, it would be greatly appreciated
> if you could help.
>
> Thanks,
> Robert
>
> --
> View this message in context:
>
http://imagej.588099.n2.nabble.com/Converted-from-AWT-to-SWING-now-mouse-doesn-t-work-tp6332398p6332398.html> Sent from the ImageJ mailing list archive at Nabble.com.
>