I would like to ask which is the right way to implement a right-click menu
With the old glCanvas, we were using the JpopUpMenu, now with Newt we add it to newtCanvasAWT but it is not working very well, it flickers, it not always appears and the background selection is not there..
The popup is working, that is if I move the mouse over a menuItem it gets selected and if I click somewhere else it disappears
But if I run this code from the MouseListener
try{
int x = me.getX();
int y = me.getY();
if (me.getModifiers()==MouseEvent.BUTTON3_MASK)
{
EC_GUI.main.hub.popUp(x, y);
}
}catch(Throwable ex)
{
ex.printStackTrace();
}
It gets stuck, that is no background selection on items, no disappearing if clicking somewhere else
Often the application doesnt answer anymore, but nothing I do not get any exception on the console output