'Not able to see another window after running form in swing
here is the code of my FlashForm.java
package main.java.com.lecture_backup.view;
public class FlashForm extends javax.swing.JFrame implements Runnable {
/**
* Creates new form FlashForm
*/
public FlashForm() {
initComponents();
new Thread(this).start();
}
@Override
public void run() {
for (int i = 0; i <= 100; i++) {
try {
jProgressBar1.setValue(i);
Thread.sleep(100);
} catch (Exception ex) {
}
}
new main.java.com.lecture_backup.view.HomePage().setVisible(true);
dispose();
}
After running the project which has FlashForm.java as its main class I am not able to see HomePage. Can you please tell me what is the reason for it is not going on HomePage after running this file? I would also like to know what changes should I do to this code for better code writing practice.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
