Main method in Class is also a normal method, which is designed to start the java application by JVM. But, you can also call it in your method
private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {
JOptionPane.showMessageDialog(null, "Completed Analysis!","Alert", 1);
jButton5.setEnabled(false);
jTextArea2.setEditable(false);
jTextArea3.setEditable(false);
ClassName.main(new String[]{"arg1","arg2"});
}
added dummy arguments to just invoke the main method