I am researching a way to restart my java application by clicking a button on the GUI. I searched the web and came across main( new String[0]). I need to understand if this is an valid way to restart my application. Can someone please advise thanks.
private void bnNewsaleActionPerformed(java.awt.event.ActionEvent evt) {
main( new String[0]);
}
Edit Would this be better?
private void bnNewsaleActionPerformed(java.awt.event.ActionEvent evt) {
classname.this.dispose();
main( new String[0]);
}