Results 1 to 3 of 3
Like Tree1Likes
  • 1 Post By totmes

Thread: Disabling system context menu

  1. #1
    totmes is offline Member
    Join Date
    Jan 2013
    Posts
    2
    Rep Power
    0

    Default Disabling system context menu

    Hi,
    I try to disable JInternalFrame by recursively disabling its components. I almost manage to do it, but I have problem with mouse events which are still handled by some L&F objects despite of these objects visually seems to be disabled. Especially right click on title pane calls system context menu. How can I get rid of it?

    TIA

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,455
    Rep Power
    20

    Default Re: Disabling system context menu

    How to get a reference to a JInternalFrame's title bar?

    Then remove any MouseListeners. Post back whether that solves the issue.

    Note that if you're planning to re-enable the JInternalFrame you'll have to maintain a reference to the MouseListener so you can add it back later.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    totmes is offline Member
    Join Date
    Jan 2013
    Posts
    2
    Rep Power
    0

    Default Re: Disabling system context menu

    Thanks for your reply.
    Removing MouseListeners is desired for others issues, but solution for disabling system context menu is invoking JInternalFrame.setComponentPopupMenu( null ).

    Totmes
    DarrylBurke likes this.

Similar Threads

  1. Java Script context menu into JAVA Context Menu...
    By cnu.nandhikonda@gmail.com in forum AWT / Swing
    Replies: 1
    Last Post: 08-22-2012, 10:14 AM
  2. Add item to menu context
    By ahmakki in forum New To Java
    Replies: 2
    Last Post: 02-15-2012, 08:58 PM
  3. Context Menu
    By ravjot28 in forum AWT / Swing
    Replies: 3
    Last Post: 01-23-2010, 06:32 PM
  4. SWT JFace bug using context menu
    By xcallmejudasx in forum SWT / JFace
    Replies: 0
    Last Post: 11-14-2008, 05:04 PM
  5. Replies: 0
    Last Post: 07-07-2008, 05:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •