Re: Drop-Down-Menu in JToolbar



Thorsten Kiefer a écrit :
Hi,
I've seen drop-down menus in e.g. eclipse, but I don't know how
to create that. It's not possible to add JPopupMenu to JToolbar.

You cann add a MouseListener on JToolbar, so you must be able to show a popup menu. If isPopupTrigger always return false on JToolbar, you can show the popup on mouseReleased for example.
.



Relevant Pages

  • Re: Drop-Down-Menu in JToolbar
    ... I've seen drop-down menus in e.g. eclipse, ... It's not possible to add JPopupMenu to JToolbar. ...
    (comp.lang.java.gui)
  • Drop-Down-Menu in JToolbar
    ... I've seen drop-down menus in e.g. eclipse, ... It's not possible to add JPopupMenu to JToolbar. ... Best Regards ...
    (comp.lang.java.gui)
  • Re: Drop-Down-Menu in JToolbar
    ... I've seen drop-down menus in e.g. eclipse, ... It's not possible to add JPopupMenu to JToolbar. ... Sounds like you don't really want a JPopupMenu, but rather a JComboBox? ...
    (comp.lang.java.gui)