this is the event on window open
when the JForm Opens This Happens
I just want to make this the feature just like adding a question to stackoverflow in
editor and display simultaneously updated content below the editior
private void formWindowOpened(java.awt.event.WindowEvent evt) {
Thread t1 = new Thread();
t1.start();
}
this is the main method
public static void main(String args[]) {
Thread t1 = new Thread(
() -> {
// DEMO is the Name of JForm
DEMO d = new DEMO();
// Text1 is the first jtextfeild
String x = d.Text1.getText();
if (x.isEmpty()) {
//ButtonAdd is the jbutton in JFrom
d.ButtonAdd.setEnabled(false);
} else {
// Text2 is the Second jtextfeild
d.Text2.setText(x);
d.ButtonAdd.setEnabled(true);
}
}
);
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new DEMO().setVisible(true);
}
});
}