posted 23 years ago
The outline below creates the JTable and creates instance of Data class. However when I compile it I get an error as follows
Undefined variable or class name: fly
return fly.getFieldInfo.length();
^
Any hints on what I am doing wrong and how to fix it
Thanks
Krishnan
package suncertify.db;
import ..
..
public class FbnModel extends JFrame
{
public void FlyTableModel() throws IOException
{
try
{
Data fly = new Data("db.db");
}
catch (Exception ex)
{
System.out.println(ex.getMessage());
}
}
class FlyTableModel extends AbstractTableModel
{
...
public int getColumnCount()
{
return fly.getFieldInfo().length;
}
....
}