While passing a variable to another class in java netbeans automatically generating extra zeroes?

97 views Asked by At

When selecting a row in Jtable getting a value to a variable , that variable want to be passed to another JFrame and that JFrame should be open !!
Actually the problem is , while opening the next jFrame two zeroes are generating which hinders the original variable.
What should be the reason , What must be the solutions ??

1

There are 1 answers

0
Clint Paul On

private void JtableMousePressed(java.awt.event.MouseEvent evt) {

if (evt.getClickCount() == 2)  // double click
    {
        nextFrame a = new nextFrame(new javax.swing.JFrame(), true);
        a.setVisible(true);

        int selectedRowIndex = Jtable.getSelectedRow();
        Object selectedObject = (Object) Jtable.getModel().getValueAt(selectedRowIndex, 6);

    }

System.out.println(selectedObject);

}