简体   繁体   中英

Exception in thread awt-eventqueue-2 java.lang.ArithmeticException / by Zero

my app seems to works fine but in some computers I receive that exception. the program check for level 2 permission and then launch a JTable with two tab. The problem is that I'm not able to replicate the problem in my.netbeans computer. Any suggestion?

Thanks in advance

Alex

This is exception that an employee send to me:

This is the code that launch exception:

                   private void TabUtenti(){
                   DefaultTableModel b = (DefaultTableModel) tabUtenti.getModel();

EXCEPTION HERE --> TableColumn tab1 = tabUtenti.getColumnModel().getColumn(0);
                   TableColumn tab2 = tabUtenti.getColumnModel().getColumn(1);
                   tab1.setHeaderRenderer(new CustomRenderer());
                   tab2.setHeaderRenderer(new CustomRenderer());
                   JTableHeader header = new JTableHeader();
                   b.setRowCount(0);
    
                   String sql = "SELECT * FROM Utenti";
                   ResultSet res = null;
                   try {.....

Solved. It seems that first I build the version that I distributed and then I cleaned the code and some lines was canceled. So, I was looking for Exception in the wrong place.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM