Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

popmenu for combobox items

Status
Not open for further replies.

softjack

Programmer
Dec 4, 2005
44
IN
Hi,

I have a combobox having some items in the drop down menu. Now i want a popup menu for each of the item. How this can be achieved. Any ideas ?

Thanks
 
Hi Dian,

Thnx for replying. Actually i need something like...

I have a combobox and i click on the drop down button... i can see all the items of combobox from where i can select

Now If i right click on any of the items of the combobox then my popup menu should appear without hiding the combobox items.

For example :

If i have a 'copy item' on my popup menu and i right click on a combobox item (say 'Apple') while all other items are displayed...popup menu should appear and whn i'll click on 'copy item', the value 'Apple' should get copied to the clipboard.

I hope tht explains the problem...please help how can i get through this.

Thanks





 
I understand, but I'm not sure how to do that. I guess you can add a MouseListener to the JComboBox component, but I don't know how it will behave on rigth click button.

My advice is to use a two-levels JMenu, will be easier and more usable.

Cheers,
Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top