1

I apologise if this is a bit vague, I know exactly what I want but I am finding it hard to describe/google.

What I have is a swing GUI with a JTable with some connection information and status' in for several connections. In the bottom row I have a "plus" icon JButton and which can add a connection.

There are two different connection types, so what I want is to click on the button, and then the two options appear next to the button in order to select one before moving on.

It would be a similar look to if you had right-clicked on the button, the options would be "above" the table in a list/combo box style, slightly to one side of the button.

Can anyone help me with this?

Thank you very much in advance.

Rob

trashgod
  • 200,320
  • 28
  • 229
  • 974
m0rv4i
  • 405
  • 2
  • 7
  • 19
  • "Add a connection" means adding a new row to the jtable or filling the row with information? Also keep in mind that a JComboBox is a button that on click displays a dropdownMenu. You might want to just add a JComboBox and customize its appearance, and do your code on item selection. – DSquare Sep 02 '13 at 11:26
  • "Add a connection" means adding a new row to the table, and thanks I will keep playing and see what I can come up with – m0rv4i Sep 02 '13 at 12:19

1 Answers1

1

We've managed to solve the issue using JPopupMenu, which nicely provides what we wanted.

See http://docs.oracle.com/javase/tutorial/uiswing/components/menu.html#popup

m0rv4i
  • 405
  • 2
  • 7
  • 19