PopupMenu « Menu « Java Swing Q&A





1. JPopupMenu errors, not selecting or closing    stackoverflow.com

Alright, so heres my problem: I have an application I am working with that creates a Dialog that has a JTree in it. when someone right clicks on the JTree I need ...

2. Java: big popup menu with additional panels    stackoverflow.com

I want to create a popup menu which has a few "big" (special) items. These "big" items should somehow behave like submenus, but they are large panels (with buttons, labels, combo boxes, ...

3. Java System Tray PopupMenu MenuItem with icons and variable fonts    stackoverflow.com

As in the title, is there a way to do it? The introductory article is either misleading or not completed.

4. change popup height    stackoverflow.com

I have a Java swing popupmenu with a couple of menuItems. Is there any way to increase the size of the popup keeping the same number of menuItems? For example, add 10px ...

5. PopupMenu    coderanch.com

namaste gurus, i hv attached a popup menu to a Jdialog. This popumenu shd pop up whn i right clk the mouse but in my case it pops up evn wth left click of a mouse. i hv used pop.show( me.getComponent(), x, y); whr x = me.getX() and y = me.getY(). this code is wrtn in mousePressed() whts the matter? pl. ...

6. invoking windows popupmenu from my JFrame[urgent]    coderanch.com

Hi Netharam, How about the example code below? import javax.swing.*; import javax.swing.event.*; import java.awt.*; import java.awt.event.*; public class JPopupFrame extends JFrame { JPopupMenu popup; JList list; public JPopupFrame() { // Create menu stuff here. popup = new JPopupMenu(); JMenuItem menuItem = new JMenuItem("Cut"); popup.add(menuItem); menuItem = new JMenuItem("Copy"); popup.add(menuItem); menuItem = new JMenuItem("Paste"); popup.add(menuItem); Container c = getContentPane(); String[] data = ...

7. jdk1.4 popupMenu problem    coderanch.com

9. List object and PopupMenu    coderanch.com





10. PopupMenu with awt componets!    coderanch.com

11. Using PopupMenu with awt components    coderanch.com

If I change the PopupMenu's to JPopupMenu's, Panel to JPanel and Frame to JFrame then the below code works, not otherwise. WHY?? import java.awt.*; import java.awt.event.*; import javax.swing.*; class PopupMenuExample1 extends Frame implementsActionListener { private PaneltopPanel; privatePopupMenupopupMenu; public PopupMenuExample1() { setTitle( "Popup Menu Application" ); setSize( 310, 130 ); setBackground( Color.gray ); topPanel = new Panel(); topPanel.setLayout( null ); //getContentPane().add( topPanel ...

12. PopupMenu & popupwindow    coderanch.com

Hi Guys, Have some questions regarding invoking a popup menu.Hope some one could give me a hand on this one... Please see attached Figure as well. [1] Have a Table having a certain number of rows.want to create a pop up menu when user selects a cell and rightclicks from that cell. But I read the following from the java tutorial: ...

13. Adding graphics to JPanel using PopupMenu    coderanch.com

Adding graphics to JPanel using PopupMenu Right. I really need help at this stage so I'll try and be as clear as I can. I essentially want to be able to create a flowchart dynamically by adding different statements. Now it doesn't look like I have much done but this is probably my 4th attempt. I basically want to draw the ...

14. Show a PopupMenu using a hotkey    coderanch.com

15. Hello!! I need to add a popupMenu to a menu    java-forums.org

Popup Menu's problem I don't want to add a pupup menu to a menuBar...I want to add it to a menu from the menuBar. Ok...here it is an example: package components; import java.awt.*; import java.awt.event.*; import javax.swing.JPopupMenu; import javax.swing.JMenu; import javax.swing.JMenuItem; import javax.swing.JCheckBoxMenuItem; import javax.swing.JRadioButtonMenuItem; import javax.swing.ButtonGroup; import javax.swing.JMenuBar; import javax.swing.KeyStroke; import javax.swing.ImageIcon; import javax.swing.JPanel; import javax.swing.JTextArea; import javax.swing.JScrollPane; import javax.swing.JFrame; ...

16. Help needed on SystemTray,TrayIcon and PopupMenu issues    forums.oracle.com

Hello; In my application,I am creating a TrayIcon at the system tray (I am using windows xp by the way).When the JFrame window is closed(it becomes hidden when close is clicked) or minimized,I restore the window via the ActionListener of the TrayIcon.The ActionListener gets invoked with double clicking to the icon at the system tray,it seems.And by default a single right ...