Data Xchange from JDialog to JTable using JButton
My head is spinning about how to get this to work. What is really confusing me is the data exchange from the JDialog.
I have a JTable where one of the columns uses a JButton as the cell editor for each cell in that column. That part seems to be no problem. The JButton is labeled "Define Staff..."
When the user clicks on the JButton, a JDialog containing a JList is to appear. If the user clicks cancel, the JDialog is disposed and nothing happens. If the user clicks OK, the selected items are to be returned to the cell in some way and the label of the JButton is to change to "Modify Staff..."
How can I return the list from the JDialog to the "cell" so that when I access the cell using getValueAt() I get the list of values, and not the JButton object?