I want to populate my jtable with columns from different table in mysql database but it only displays the column names and not the data or information under those columns. i hope this code helps u undertand what i mean. thanks

private void Update_table(){
        try{
        String sql = "select Date_Acquired 'Date Acquired',Serial_Number 'Serial Number',Description 'Description',Cost_Of_Acquisition 'Cost Of Acquisition',Monthly_Depreciation 'Monthly Depreciation',Accumulated_Depreciation 'Accumulated Depreciation',Net_Book_Value 'Net Book Value',Branch_Area 'Branch Area',Depts_name 'Department Name',User 'User',Status 'Status' from items,branches,department_tbl,net_book_value,asset_update";
        pst = conn.prepareStatement(sql); 

        rs = pst.executeQuery();
        dep_report.setModel(DbUtils.resultSetToTableModel(rs));
        }
        catch(Exception e){
            JOptionPane.showMessageDialog(null, e);

        }finally{
    try{
        rs.close();
        pst.close();
    }
    catch(Exception e){
    JOptionPane.showMessageDialog(null, e);      
    }
        }
    }  

Since your resultSetToTableModel isn't part of the standard Java API its hard to know how solid it is.
Did you try printing from your result set to confirm that it has some data in it?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.