jpopupmenu Questions
9
Solved
I would like to add a way to scroll through menu items in a JPopupMenu, much like scrolling through a list of items in a JComboBox.
Let's say I have 10 menu items. I would like to display only 5 m...
Illyes asked 15/2, 2012 at 5:34
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
7
Solved
I want to create a Toolbar in my application. If you click a button on that toolbar, it will pop up a menu, just like in Eclipse's toolbar. I don't know how to do this in Swing. Can someone help me...
Yet asked 7/11, 2009 at 10:47
3
Solved
I want to use JCheckBoxMenuItems in a JPopupMenu. It works, but the problem is that the popup menu disappears when a checkbox item has been checked or unchecked. So if one wants to check/uncheck se...
Connacht asked 21/9, 2010 at 10:26
5
I want to add JPopupMenu to the task bar as a TrayIcon (i.e systemTray.add(trayIcon)) but I haven't found a way to do so.From the docs the constructor of TrayIcon looks like :
public TrayIcon(Imag...
Differentiation asked 1/10, 2012 at 4:25
3
Solved
I have a JPopUpMenu that I added to multiple JTables and I would like to get the specific table that's right clicked so I can make changes to it. How can I get the component that triggers the JPopu...
Mcmaster asked 14/9, 2012 at 8:39
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
5
Solved
I'm currently creating a right-click context menu by instantiating a new JMenu on right click and setting its location to that of the mouse's position... Is there a better way?
Parasitic asked 20/4, 2009 at 5:1
5
Solved
I am working on task tray Icon in java, I like to open a popup Menu using left click same popup Menu as I open on right click, and please help me with a quick response.
Thanks in advance...
here ...
Spandau asked 11/7, 2012 at 7:54
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
3
Solved
I would like to add right click menu for my program. I added basit menu with the following code:
Pmenu = new JPopupMenu("Menu");
menuItem = new JMenuItem("Sections");
Pmenu.add(menuItem);
menu...
Whatnot asked 5/10, 2011 at 13:30
1
Solved
When I try to paste into a JTable cell using table.setValueAt(), the cell I am pasting in remains blank, but setValueAt() seems to be working. Also, when I try to cut or copy from one cell, the Pas...
Derogatory asked 24/3, 2014 at 23:58
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
4
Solved
I'd like to customize the look of JPopupMenu so i made a custom class extending the JPopupMenu class on i overrode the paintComponent method as i would do for any component i need to customize.
pu...
Observation asked 9/10, 2012 at 13:21
3
Solved
I have a situation where I have a popup menu created when a JTable is right clicked on. Standard way of creating the popup menu:
aJTable.setComponentPopupMenu(rightClickMenu);
Now afterwards in ...
Marciano asked 11/12, 2012 at 6:31
7
Solved
I needed a JButton with an attached dropdown style menu. So I took a JPopupMenu and attached it to the JButton in the way you can see in the code below. What it needs to do is this:
show the pop...
Liverpool asked 11/3, 2010 at 1:20
4
Solved
I have a java program that opens a popup menu when right clicked in a JPanel. When any of the popup menu items are clicked, I want to print the location of the right click that triggered the popupm...
Avigdor asked 1/12, 2012 at 15:22
3
Solved
I have a JTextField for which I'm hoping to suggest results to match the user's input. I'm displaying these suggestions in a JList contained within a JPopupMenu.
However, when opening the popup me...
Disclose asked 5/4, 2012 at 13:48
3
Solved
Nimbus often looks great, but for certain color combinations the result is non-optimal. In my case, the background of a JPopupMenu does not fit, which is why I want to set it manually.
I'm on Java...
Foehn asked 23/7, 2012 at 23:43
1
Solved
I am trying to implement a JTree to represent a database!
The Root is the database, which can have several relations. Each relation can have attributes and functional dependencies.
Each node (data...
Easternmost asked 9/5, 2012 at 9:17
2
Solved
I have a Canvas, some text fields and a context menu.
When I start the application and right click on the canvas a popup menu shows. But when I write something inside the text field than I right c...
Boor asked 6/3, 2012 at 17:13
1
Solved
I have a JComboBox (among other components) inside a JPopupMenu. It turns out that whenever I open the combo box's popup (to select an item), the parent JPopupMenu closes. I've been trying to find ...
Carlina asked 14/12, 2011 at 20:49
2
Solved
I am an experienced Java programmer, but a Swing newbie so please bear with me.
I wish to have a JPopupWindow which has keyboard focus. I want to respond to arrow keys, escape (to close the menu) ...
Antony asked 14/12, 2011 at 15:58
2
Solved
There are some properties of the right-click context menu I would like to replicate with a JPopupMenu:
When menu is open and you click elsewhere, menu closes.
When menu is open and you click el...
Canaletto asked 3/6, 2011 at 17:14
2
Solved
how can I prevent triggering and showing JPopupMenu only if is Mouse Cursor over selected JTable'Row
my question: if is there another way as getBounds from selected row and determine/compare that ...
Lalalalage asked 14/9, 2011 at 22:2
1 Next >
© 2022 - 2024 — McMap. All rights reserved.