1
public InventoryJFrame() throws ClassNotFoundException {
    try {
        initComponents();
        Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver" );
        StringstringCon="jdbc:sqlserver://AAYANPC;databaseName=Qseal;user=sa;password=123";

        Connection con=DriverManager.getConnection(stringCon);
        Statement state=con.createStatement();
        ResultSet rs=state.executeQuery("select * from Qseal");
        ResultSetMetaData rsmetadata=rs.getMetaData();
        int columns=rsmetadata.getColumnCount();
        DefaultTableMode1 dtm=new DefaultTableMode1();
    }   
    catch (SQLException ex) {

        Logger.getLogger(InventoryJFrame.class.getName()).log(Level.SEVERE, null, ex);
    }
}

i get a error in the line DefaultTableMode1 dtm=new DefaultTableMode1();. The error is "cannot find symbol" and in the hint it says that create a pachkage DefaultTableName in source pack

Mincong Huang
  • 5,284
  • 8
  • 39
  • 62
Mohit Joshi
  • 15
  • 1
  • 8

1 Answers1

1

According to What does a “Cannot find symbol” compilation error mean?

A "Cannot find symbol" error is about the identifiers. When your code is compiled, the compiler needs to work out what each and every identifier in your code means.

A "Cannot find symbol" error means that the compiler cannot do this. Your code appears to be referring to something that the compiler doesn't understand.

I suppose you have a spelling error when taping DefaultTableModel. It ends with the character l instead of the digit 1.

Community
  • 1
  • 1
Mincong Huang
  • 5,284
  • 8
  • 39
  • 62