public void sent(class2 theOtherClassInstance) { if (jCheckBox1.isSelected()) { theOtherClassInstance.jTextField1.setText("sent this text"); // "jtextfield1" in class2 } } private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { class2 theOtherClassInstance = new class2(); theOtherClassInstance.setVisible(true); sent(theOtherClassInstance); this.setVisible(false); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)