Can anyone show me what I have misunderstood here about how to do
this? Clearly the task I am describing is nothing novel, and must have
been done a million times before, but for some reason I cannot find a
sample of how to accomplish it, and I'm not even sure I am on the
right path at all here. Thanks, RVince
table.getSelectionModel().addListSelectionListener(
new ListSelectionListener() {
@Override
public void valueChanged(ListSelectionEvent arg0) {
if(table.getSelectedColumn
()==0{
//do something that
changes the model's
// data vector based
on the value in the chosen
//cell's JComboBox
((DefaultTableModel)
table.getModel()).fireTableDataChanged();
}
}
}
};
> Can anyone show me what I have misunderstood here about how to do
> this?
Not without an <http://sscce.org/>, such as may be found here:
<http://java.sun.com/docs/books/tutorial/uiswing/examples/components/
TableRenderDemoProject/src/components/TableRenderDemo.java>
<http://groups.google.com/group/comp.lang.java.gui/msg/79840a35efd248c1>
See also:
<http://java.sun.com/docs/books/tutorial/uiswing/components/table.html>
--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>
John B. Matthews already pointed out the need for an SSCCE and gave you some
examples to follow. Also, drop the use of unreadable indentation for Usenet
posts. Your indentation was insane. Use a maximum of four spaces (for Pete's
sake, not TABs!) per indent level.
People are far less willing to help when you make it difficult for them.
--
Lew