im calling invokeLater direcly from button on actionPerformed with this code:
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
int temp = (jComboBox1.getSelectedIndex() + 1);
heavyProccesingFunction();
}
});
}
and that still freezes the GUI. Why? I get the same result without using the invokelater function.
should I Use
Thread queryThread = new Thread() {
public void run() {
instead?
Edit:
Thanks, new thread should be used.