Link to home
Start Free TrialLog in
Avatar of Mero
Mero

asked on

Getting data from a particular cell in a table

I'm retrieving data from a remote Oracle database.  Is there a method or something else that gets the contents off a cell of a highlighted row in a table?  If it helps, I'm using Borland JBuilder 3. Thanks.
ASKER CERTIFIED SOLUTION
Avatar of sgoms
sgoms

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of vivexp
vivexp

Hi,

If u r using DefaultTableModel then,

 String[] s={"A","B","C","D","E","F","G","H","I","J","K"};//s is col //names,50 is no. of rows.

  DefaultTableModel dtm=new DefaultTableModel(s,50);
  JTable jT = new JTable(dtm);

To access a cell in the table use
dtm.getValueAt(jT.getSelectedRow(), jT.getSelectedColumn());


Try out ....
Bye