Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Prevent hide popup menu

 
deep pat
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I've created a popup menu with comboboxes which is brought forward upon a button click. I would like to prevent it from hiding when i check or on check combobox(es).

Please give me an advice coz for the moment my popup menu disappears each time i check/uncheck a combo.

I also tried the trick found at another forum

But it's not working.

Thanks in advance
 
Brian Cole
Author
Ranch Hand
Posts: 899
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
deep pat wrote:
I also tried the trick found at another forum
But it's not working.


Surely you mean someOtherThing.putClientProperty("doNotCancelPopup", preventHide) on line 3, no?
 
deep pat
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Surely you mean someOtherThing.putClientProperty("doNotCancelPopup", preventHide) on line 3, no?

Well, i really dont know, i tried using other things (the popup menu itself or the button which calls it) at line 3 but of no avail.

I saw the trick supposed to prevent the popup menu from hiding on this site.
webpage

As fact, I'm trying to create a JTable with a button on the top right of the scrollbar which opens a popup menu with comboboxes and table column names (As in JXTable but using JTable ). I have the desired result except the popup disappears each time i click on the combo.

I'm surely missing something but what?
 
Martin Lindgren
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am struggling with this issue as well. Does anyone have further advice on how to solve it? Did you solve it Deep pat? Not sure if you will notice this late bump but worth a shot ;-)
 
Darryl Burke
Bartender
Posts: 5125
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Martin, welcome to the Ranch! To get better help sooner, post a SSCCE (Short, Self Contained, Correct (Compilable), Example) that demonstrates the problem (and don't forget to UseCodeTags <-- link ).
 
Martin Lindgren
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you!

This little piece of code will explain my problem.


Click anywhere to make the popup window with the combobox appear. Then when clickin on the combobox, the actual popup disappears. After some research I thought I found a solution which was the one that Brian Cole mentioned:

But that didn't change anything.

Any suggestions? I know that one solution is to skip the popup frame and make a window instead, but that will need a lot of rework in the code
which I would rather not re-implement.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


you'll have to work out what's best for you to dispose the popup

one way might be to add this to the frame's listener
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic