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
Joined: Sep 20, 2005
Posts: 852
posted
0
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?
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
Joined: Jul 02, 2012
Posts: 2
posted
0
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 ;-)
luck, db
There are no new questions, but there may be new answers.
Martin Lindgren
Greenhorn
Joined: Jul 02, 2012
Posts: 2
posted
0
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
Joined: Jun 09, 2003
Posts: 4632
posted
0
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