Button that pops a menu which triggers commands?


What is the clean way of making a Button with a custom appearance, that pops a menu with commands to be executed?

Right now I’m using a ComboBox, making all of the colors transparentBlack (so they don’t draw) and responding to comboBoxChanged by checking getSelectedId() but this is a pretty lame solution.

What’s the proper way?


I just use a normal button, set it to trigger on mouse-down, and pop up a menu when it’s clicked.