Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to code a DropDownButton in Java

I need to create a button like this in Java:

ContextMenuButton

You can click on the left part of the button for a normal button action and you can click on the arrow on the right to open a drop down menu.

Is it possible to create something like this in java? Thanks!

like image 682
bw2801 Avatar asked Mar 28 '13 12:03

bw2801


1 Answers

In this tutorial the writer shows how to create a button and have a drop down appear next to it when it is clicked. This looks a lot like what you try to achieve. Hope this helps.

http://java.dzone.com/news/drop-down-buttons-swing-new-al

The split button might provide a simpler solution if the Gnu Lesser GPL is ok for you

http://code.google.com/p/jsplitbutton/

like image 155
gebirgsbärbel Avatar answered Sep 24 '22 10:09

gebirgsbärbel