question: public AddUpdateRowDialog ( DefaultTableModel mainTableModel , RowController rowController , Object [ ] columns , Object [ ] row , int rowIndex ) { super ( new Frame ( ) , true ) ; initComponents ( ) ; setLocationRelativeTo ( null ) ; defaultTableModel = ( DefaultTableModel ) addUpdateRowTable . getModel ( ) ; this . mainTableModel = mainTableModel ; this . rowController = rowController ; this . columns = columns ; this . row = row ; this . rowIndex = rowIndex ; if ( row == null ) { setTitle ( "Add new row" ) ; for ( Object column : columns ) { defaultTableModel . addRow ( new Object [ ] { column , "" } ) ; } } else { setTitle ( "Update row" ) ; for ( int i = 0 ; i < columns . length ; i ++ ) { defaultTableModel . addRow ( new Object [ ] { columns [ i ] , row [ i ] } ) ; } } }
target:  Creates new form AddUpdateRowDialog