Hi,
I am trying to create an editor using JTextpane. Now I need to show a dynamic pop up menu while pressing Ctrl + space. But the problem is that I can trigger the pop up menu only by right click of mouse. The code snippet that I used is given below.
frame.addMouseListener(new MouseAdapter(){
public void mouseReleased(MouseEvent Me){
if(Me.isPopupTrigger()){
Pmenu.show(Me.getComponent(), Me.getX(), Me.getY());
}
}
});
I am able to invoke Ctrl + space.. But not able to invoke pop up menu using this.Is there any method or short cut to trigger pop up menu using key board? Please help...
Thanks in advance......