Results 1 to 5 of 5
  1. #1
    ShardaD is offline Member
    Join Date
    Jun 2010
    Posts
    4
    Rep Power
    0

    Default Menus stay extended in some scenarios

    Hi all,

    I have one application in which i have used JMenuBar with menus & submenus.
    the functionality of menus is working fine but in some scenarios menus does not get closed.

    steps:
    1. click on menu then menu get extended.
    2. when i click outside the menu ... the menu get closed. --- working fine
    2. but when i perform some other operations in my application & then follow same process which is mentioned in step 1 & 2.

    In this case when I click outside the menu then that menu doesn't get closed, it stay extended until I am not clicking to that menu again.

    Please help me and take me out from this issue.

    Thanks in advance,
    Sharda

  2. #2
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,453
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by ShardaD View Post
    Hi all,

    I have one application in which i have used JMenuBar with menus & submenus.
    the functionality of menus is working fine but in some scenarios menus does not get closed.

    steps:
    1. click on menu then menu get extended.
    2. when i click outside the menu ... the menu get closed. --- working fine
    2. but when i perform some other operations in my application & then follow same process which is mentioned in step 1 & 2.

    In this case when I click outside the menu then that menu doesn't get closed, it stay extended until I am not clicking to that menu again.

    Please help me and take me out from this issue.

    Thanks in advance,
    Sharda
    Does that 'other operation' run on the EDT (Event Dispatch Thread)? If so, the processor is tied to that operation and there is no time left to redraw anything. Try to run that task in another Thread (read the API documentation for SwingWorker and Thread).

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,202
    Rep Power
    19

    Default

    ShardaD 's earlier thread: JButton with Icon & text alignment issue

    3 useful responses, didn't bother to reply to them. Conclusion: doesn't deserve help on a forum.

    db

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by Darryl.Burke View Post
    ShardaD 's earlier thread: JButton with Icon & text alignment issue

    3 useful responses, didn't bother to reply to them. Conclusion: doesn't deserve help on a forum.

    db
    Let's wait and see how he handles this current thread and if he ever goes back and acknowledge the replies made in his previous threads. If he acquits himself well, then all is well and good. If he doesn't and continually ignores replies, then yes, I agree with Darryl, let's ignore all future questions. This should prove interesting.

  5. #5
    ShardaD is offline Member
    Join Date
    Jun 2010
    Posts
    4
    Rep Power
    0

    Default

    First of all sorry, because of some reasons I forgot to reply to earlier posts.
    I must say thanks to all of you for your guidance.
    and I hope I will get same response for my doubts/queries.
    Once again sorry & thanks.

    Thanks Joash,
    yes the Other operations are running on EDT.
    but now I am running it on another thread, and its working fine now.
    Thanks a lot.
    Last edited by ShardaD; 01-11-2011 at 10:35 AM.

Similar Threads

  1. Sign up to stay abreast on Open source
    By lucid12 in forum Java Software
    Replies: 0
    Last Post: 08-18-2010, 07:23 AM
  2. Forcing the mouse to stay quiet
    By ProspectiveDeveloper in forum AWT / Swing
    Replies: 4
    Last Post: 05-02-2010, 11:17 PM
  3. Replies: 2
    Last Post: 03-30-2010, 05:36 PM
  4. A place to post beginner/inter exercises/scenarios
    By helpisontheway in forum New To Java
    Replies: 0
    Last Post: 01-27-2010, 09:03 AM
  5. Menus Not Displaying
    By kahaj in forum AWT / Swing
    Replies: 12
    Last Post: 09-23-2009, 04:31 AM

Posting Permissions

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