wood burning stoves*
The moose likes Swing / AWT / SWT and the fly likes jtable combo box value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "jtable combo box value " Watch "jtable combo box value " New topic
Author

jtable combo box value

gowtham cow
Greenhorn

Joined: Oct 01, 2010
Posts: 4
how to get the combo box selected value in jtable in event

like tablemodellistener

i tryed

getRightPanel().getProtocolOptionsTreeTablePanel().getTreeTable().getModel().addTableModelListener(new javax.swing.event.TableModelListener
() {
public void tableChanged(TableModelEvent e) {


int i=getRightPanel().getProtocolOptionsTreeTablePanel().getTreeTable().getSelectedRow();
int j=getRightPanel().getProtocolOptionsTreeTablePanel().getTreeTable().getSelectedColumn();
String ss=getRightPanel().getProtocolOptionsTreeTablePanel().getTreeTable().getValueAt(i,j).toString();
System.out.println(i+"row"+j+"value"+ss);



}
});

please help me
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

"gowtham cow",
Check your Private Messages. You've already been told to do so a couple of times. This is your last warning.


[My Blog]
All roads lead to JavaRanch
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2171
    
    7
The TableModelEvent has all the information you need to get the current value in the model:

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jtable combo box value