Filters within a JPopupMenu

31 views
Skip to first unread message

Pedro

unread,
Apr 7, 2015, 8:11:34 AM4/7/15
to tablefil...@googlegroups.com
Hi;

I am trying to use the filters in panel inside a JPopupMenu but the combobox is not properly showed.
Any idea?

How could I disable the combobox(the arrow) option?? Maybe is esaier and will work too.

Thank you.
regards.

coderazzi

unread,
Apr 9, 2015, 8:55:19 AM4/9/15
to tablefilter-swing
Hola, Pedro,

Can you send me a screenshot of what you want to achieve / some code
for me to verify it?

Cheers,

Lu/
> --
> You received this message because you are subscribed to the Google Groups
> "tablefilter-swing" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to tablefilter-sw...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Pedro Macías Gordaliza

unread,
Apr 9, 2015, 9:50:35 AM4/9/15
to tablefil...@googlegroups.com
Hi lu;

I send you a video. 
I embedded the table-filters inside a JpopUpMenu that is showed when I click the right button. I can use the filters by name but when I press the arrow it does not work as you could see.
I use your filters for the other table as you can see and everything works perfect, so likely is something about using the popups so maybe is just easier disabling the arrow function, is enough for my purpose in my small application. 

best regards and congrats for a really nice feature.

You received this message because you are subscribed to a topic in the Google Groups "tablefilter-swing" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tablefilter-swing/Rx30fofyU_A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tablefilter-sw...@googlegroups.com.
lu.mp4

coderazzi

unread,
Apr 9, 2015, 12:19:25 PM4/9/15
to tablefilter-swing
Hi, Pedro, some way that you could send me some code for me to follow
the problem?

I see obviously what is happening on the video, but it would be easier
for me to have something to work with...

Cheers,

Lu/

Pedro Macías Gordaliza

unread,
Apr 10, 2015, 6:57:27 AM4/10/15
to tablefil...@googlegroups.com
Hi Lu;
Sorry I could not answer before, I was quite busy at work yesterday. Here I add you a small(stupid) app as example with the problem.
The popup is invoked with a right click on the table header. A new table is showed the text filters work perfectly but not the spinner.

Best Regards
TableDumm.java

coderazzi

unread,
Apr 11, 2015, 6:45:03 AM4/11/15
to tablefilter-swing
Hi, Pedro,

This relates to old bug in Swing:

http://stackoverflow.com/questions/6559275/jcombobox-on-a-jpopupmenu

The solution that you propose (not showing the drop down) would
eventually work, and is easy to implement (although in an ugly way),
but it seems better trying to use the proposed solution in that thread
(PopupWindow, copied in fact from a java forum thread). what do you
think?

BR,

Lu/

On Fri, Apr 10, 2015 at 12:57 PM, Pedro Macías Gordaliza

Pedro Macías Gordaliza

unread,
Apr 11, 2015, 1:52:59 PM4/11/15
to tablefil...@googlegroups.com
Cool! Thank you Lu. I could not find the issue by myself.
My small app is working perfectly now!!

Best Regards.

coderazzi

unread,
Apr 12, 2015, 5:13:12 AM4/12/15
to tablefilter-swing
Great, Sir,

enjoy the weekend!

Lu/
Reply all
Reply to author
Forward
0 new messages