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

78 views Asked by At

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 {.....
1

There are 1 answers

0
Magobin On

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.