Domanda

I have added checkboxes inside combo box in Java. But when I open drop down menu and check one check box, the drop down menu closes. So to select each check box I have to open it every time. Is there any way so that I can keep the drop down list opened till the time I dont click outside so that I can select any number of check boxes at one time only. Please help!!

È stato utile?

Soluzione 2

I recommend that you to use the Japura API to deal with this, check this link:

http://www.japura.org/checkcombobox

Best Regards :)

Altri suggerimenti

I have added checkboxes inside combo box in Java. But when I open drop down menu and check one check box, the drop down menu closes. So to select each check box I have to open it every time. Is there any way so that I can keep the drop down list opened till the time I dont click outside so that I can select any number of check boxes at one time only.

  • no there isn't, this is default property of (BasicXxx)Popup implemented in Swing API, workaround for series of Bugs in Java1.4_xxx

  • no_way, only by using dirty hacks, usage of can be Java Version sensitive, or required left mouse button as accelerator

  • don't do that, another way (and proper of possible ways) is usage of JWindow/undecorated JDialog but required to override ESC Key and Focus lost in Windows three (as you can see in good Java JCalandars/JDatePickers),

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top