• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to create a custom JButton-Menu JToolbar item...?

 
landon manning
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm looking for a component that behaves like the "Back" button in the tool bar of Internet Explorer or the "Run ..." button in the tool bar of Eclipse.
The component has 2 parts, the first part behaves like a normal button in a toolbar (in that if you click on it, you get the action associated with it). The second part is like a menu (JMenu) with a down arrow icon that would pop up a list of options (which would be a bunch of JMenuItems, if we were doing menus).
Adding a JMenuBar (next to a JButton) to a JToolbar doesn't quite work too well (the layout of the components is all misalligned).
This component is going to be on a JToolbar.
Any ideas or does someone know where code to do this is?
Thanks
 
VIJAY Yadlapati
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For me, it seems like a Customised ComboBox, with its renderer always displays an image.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!