jmenuitem Questions
6
I wish to programmatically cause a particular item on a menu to be selected and to display as such so that if Enter is pressed, the corresponding action will be performed. Ubnfortunately I find tha...
Attain asked 12/2, 2013 at 18:14
1
I'm using a single row JTabel with a MouseAdapter attached to it. The table model is populated with some random values. Upon right-clicking the table a JPopupMenu with several JMenuItems will appea...
Literalminded asked 2/2, 2017 at 23:9
3
Solved
When attempting to click on an item in a submenu, it is natural to quickly draw your mouse across the menu items below it. Both Windows and Mac natively handle this by putting a small delay before ...
3
Solved
Would it be possible to create a custom JMenuItem that contains buttons? For example would it be possible to create a JMenuITem with an item similar to this:
+----------------------------------...
2
Solved
I would like to programmatically expand a particular JMenuItem in a JPopup. For example in the code below
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing....
Lefebvre asked 12/8, 2014 at 9:24
2
Solved
7
Solved
In my Java swing application i have noticed that when i click on a disabled JMenuItem in a JPopupMenu it hides the menu, but i i do not want to hide it, as if nothing is clicked. Is there a way to ...
Idolater asked 6/3, 2011 at 13:9
2
Solved
I want to add JMenuItem without closing JMenu. A menu contains a JTextField, When I press enter in text field, it added a menu Item. My problem is the size of added menu item is too small.
import ...
2
I need some help with my ActionListener on my JMenuBar.
There's no error; however every time I click on a JMenuItem, it triggers all the action associated with the JMenuItem. My question is: am I ...
Builtin asked 16/8, 2012 at 3:1
2
Solved
So i noticed that in awt there is a MenuItem constructor for adding a CTRL + (some key) shortcut, but there is no such constructor for JMenuItem. What is the correct way to do this?
I need an equi...
2
Solved
How can I add a vertical separator in the pop up menu of the app in the task bar ?
tray = SystemTray.getSystemTray();
openMenuItem = new MenuItem("Open P");
stopKLMenuItem = new MenuItem("Stop...
Harrovian asked 28/9, 2012 at 11:8
2
2
I want to set an accelerator to a JMenuItem.
Right now I am setting it like this
openFile.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, ActionEvent.CTRL_MASK));
and it's working but I do...
Mossy asked 15/4, 2012 at 8:48
3
Solved
I'm making a GUI that has a Jmenu; it has the jmenu items that will be doing things when clicked. That is the problem. I've looked and looked, but I can't find out how to make it do something when ...
Niggerhead asked 19/3, 2012 at 22:2
2
Solved
I've created a simple menu bar and I don't know how to import an image in the free space.
My code is below:
import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
import java.io.IOExce...
1
Solved
I have a set of JMenuItems in a JPanel on one layer of a JLayeredPane, and an emulated cursor painted in a JPanel on a higher layer. When the menu items repaint, they paint over the emulated cursor...
Turtledove asked 14/4, 2011 at 19:39
1
© 2022 - 2024 — McMap. All rights reserved.