Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JPopupMenu disappears on mouseEntered  RSS feed

 
Tempex Palton
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I've a swing structure : JPopupMenu contains JPanel which contains JCheckBoxMenuItem. The problem is, I cannot use it because JPopupMenu disappears when mouse enters to any MenuItems.
I added JCheckBoxMenuItem to JPanel(because to make it scrollable, as there are large number of menu-items) and then JPanel to JPopupMenu.
I'm using NetBeans IDE.
Here is the code, done so far.



Please help. Thanks in advance.
 
Rob Camick
Ranch Hand
Posts: 2800
15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Quit cross posting: http://www.java-forums.org/awt-swing/85954-jpopupmenu-disappears-mouseentered-how-prevent.html

You got help yesterday when you posted the same question. You have not listened or replied to any of the advice you got yesterday.
 
Tempex Palton
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Rob Camick: Actually I did not get any solution from that post, and also I dont know what's wrong with the code. That's why I posted it here. Could you please help me out ?
 
Rob Camick
Ranch Hand
Posts: 2800
15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did not get any solution from that post,


You were asked to post a SSCCE. You didn't so we can't help.
 
Tempex Palton
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a single piece of code of my entire project. I'm stuck in this portion. That's why I've posted this portion. Please check this code & inform what's wrong with this.
 
Rob Camick
Ranch Hand
Posts: 2800
15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please check this code & inform what's wrong with this


What is wrong is that the code you posted is not in the form of a SSCCE. I can't test your code. Read the link!!!

Also, read the Swing tutorial How to Use Menus for working examples.
 
Tempex Palton
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Rob Camick : I've posted SSCCE. Could you please test it ?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66184
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post the SSCCE here on CodeRanch.
 
Tempex Palton
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Bear Bibeault : I've already posted(edited) the code above. Please check it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!