i'm trying to reload my frame using a button. i have tried this code. but my frame just disappear and won't appearing again. then i have google it and tried revalidate()
validate()
and repaint()
too. but noting happend. what should i do?
I want to do that, because in this frame i have some function to disable some combo box, rename some label, and clear some text field. and i want to "reset" them to default value as first. and if i use setText label or re enable combo box, i think it will take a lot code. i'm using netbeans by the way.
And i have tried to write a method which can reset the individual values back to there default states
But i want to find another more eficient code to do that.
private void btRestartActionPerformed(java.awt.event.ActionEvent evt) {
setVisible(false);
setVisible(true);
}
this is my action performed button. thank you