Commit 8a6f5161 authored by claes's avatar claes

Error in popup menu size fixed

parent c517727b
......@@ -122,7 +122,6 @@ public class GeDynOptionMenu extends GeDynElem {
JMenuItem item;
JPopupMenu popup = new JPopupMenu();
popup.setPopupSize( width, popup.getHeight());
for ( int i = 0; i < 32; i++) {
if ( itemsText[i] != null) {
popup.add( item = new JMenuItem( itemsText[i]));
......@@ -133,6 +132,7 @@ public class GeDynOptionMenu extends GeDynElem {
popup.setBackground(color);
popup.addPopupMenuListener( this);
popup.show( invoker, x, y);
popup.setPopupSize( width, popup.getHeight());
}
public void popupMenuWillBecomeVisible( PopupMenuEvent e) {}
......@@ -166,7 +166,7 @@ public class GeDynOptionMenu extends GeDynElem {
}
else
return;
System.out.println("Action " + event.getActionCommand());
// System.out.println("Action " + event.getActionCommand());
break;
}
}
......
......@@ -122,7 +122,6 @@ public class GeDynOptionMenu extends GeDynElem {
JMenuItem item;
JPopupMenu popup = new JPopupMenu();
popup.setPopupSize( width, popup.getHeight());
for ( int i = 0; i < 32; i++) {
if ( itemsText[i] != null) {
popup.add( item = new JMenuItem( itemsText[i]));
......@@ -133,6 +132,7 @@ public class GeDynOptionMenu extends GeDynElem {
popup.setBackground(color);
popup.addPopupMenuListener( this);
popup.show( invoker, x, y);
popup.setPopupSize( width, popup.getHeight());
}
public void popupMenuWillBecomeVisible( PopupMenuEvent e) {}
......@@ -166,7 +166,7 @@ public class GeDynOptionMenu extends GeDynElem {
}
else
return;
System.out.println("Action " + event.getActionCommand());
// System.out.println("Action " + event.getActionCommand());
break;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment