1. How do I create a right click context menu in Java Swing? stackoverflow.comI'm working on a school project and we want to implement a right click pop-up menu in the gui.
Currently we are doing something like creating a |
2. Java Swing : Alt-tab styled menu (context switching menu) stackoverflow.comAre there any current implementations or frameworks for Java Swing that include functionality for a context-switcher menu?More detail: In our application, we have several sub-parts of the application, and only one of ... |
3. Actions in NetBeans module - context menu, main menu stackoverflow.comI am developing NetBeans module and I have declared an action (using annotations, they are translated to layer.xml record) which works with my custom project type (EsperProject class):
|
4. Attaching the default context menu to a StyledText coderanch.comHi all, I have recently changed my Text widgets to StyledText, but have discovered that they no longer have the default Windows popup/context menu (with all the Edit functionality - Copy, Paste, etc). I can create a context menu and define all the Edit actions in it and then attach this menu using StyledText.setMenu(). But it's not very neat - the ... |
5. Context Menu java-forums.orgfinal String demoText = "Fred's flight objection fixes and zaps the wavy bump quickly."; Action resetAction = new AbstractAction("Reset") { public void actionPerformed(ActionEvent e) { text.setText(demoText); } }; final JPopupMenu resetMenu = new JPopupMenu(); resetMenu.add(new JMenuItem(resetAction)); text = new JTextField(demoText); text.addActionListener(this); text.addMouseListener(new MouseListener() { void popup(MouseEvent e) { resetMenu.show(text, e.getX(), e.getY()); } public void mousePressed(MouseEvent e) { if(e.isPopupTrigger()) popup(e); } public ... |