Results 1 to 4 of 4
Thread: JPopupMenu not responding
- 08-09-2011, 12:25 PM #1
Senior Member
- Join Date
- Feb 2010
- Posts
- 128
- Rep Power
- 0
JPopupMenu not responding
Hi Java fans,
I have a pickle situation. So I have this RightClickMenu object which extends JPopupMenu.
It does get displayed when needed and all that - but. If I hover over the JMenuItems, they do not change background color to blue as a selected item. I had action listeners added to some of the items to see if responds to anything and it did print out stuff when items get clicked.Java Code:package GUI; import javax.swing.*; public class RightClickMenu extends JPopupMenu { private final static JMenu set_stage = new JMenu("Set Stage"); public RightClickMenu() { super(); JMenuItem set_warranty = new JMenuItem("Set Warranty"); JMenuItem print_ber = new JMenuItem("Print BER"); JMenuItem print_documentation = new JMenuItem("Print Documentation"); JMenuItem add_quick_note = new JMenuItem("Add Quick Note"); JMenuItem view_order = new JMenuItem("View Order"); createStages(); addSeparator(); add(set_stage); add(set_warranty); add(print_ber); add(print_documentation); add(add_quick_note); add(view_order); } private static void createStages() { JMenuItem letter_sent = new JMenuItem(OrderV2.LETTER_SENT); JMenuItem console_received = new JMenuItem(OrderV2.CONSOLE_RECEIVED); JMenuItem console_repaired = new JMenuItem(OrderV2.CONSOLE_REPAIRED); JMenuItem console_posted = new JMenuItem(OrderV2.CONSOLE_POSTED); JMenuItem quarantine = new JMenuItem(OrderV2.QUARANTINE); JMenuItem quarantine_to_invoice = new JMenuItem(OrderV2.QUARANTINETOINVOICE); JMenuItem ber = new JMenuItem(OrderV2.BER); set_stage.add(letter_sent); set_stage.add(console_received); set_stage.add(console_repaired); set_stage.add(console_posted); set_stage.add(quarantine); set_stage.add(quarantine_to_invoice); set_stage.add(ber); } }
Thanks for your responses.
FlynnMeasuring programming progress by lines of code is like measuring aircraft building progress by weight.
- 08-09-2011, 12:48 PM #2
To get better help sooner, post a SSCCE that clearly demonstrates your problem.
db
- 08-09-2011, 01:01 PM #3
Senior Member
- Join Date
- Feb 2010
- Posts
- 128
- Rep Power
- 0
Ah... that does make more sense :)
Measuring programming progress by lines of code is like measuring aircraft building progress by weight.
- 08-09-2011, 04:19 PM #4
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,377
- Blog Entries
- 7
- Rep Power
- 17
Similar Threads
-
Responding to clicks outside a window
By bayan in forum New To JavaReplies: 6Last Post: 06-14-2010, 04:51 PM -
Focus traversal keys not responding
By javaexplorer in forum AWT / SwingReplies: 1Last Post: 02-16-2010, 08:52 AM -
JPopupMenu
By hungleon88 in forum NetBeansReplies: 8Last Post: 01-15-2009, 05:00 PM -
Responding to button presses
By Java Tip in forum javax.swingReplies: 0Last Post: 06-26-2008, 07:38 PM -
JAXB unmarshall not responding (help needed)
By Buglish in forum XMLReplies: 0Last Post: 06-03-2008, 11:26 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks