JAVA:从主类调用GUI类
因此,基本上,我想在主类中调用GUI类,但没有成功
package javaui;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
public class JavaUI {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
SwingUtilities.invokeLater(new Runnable() {
public void run() {
RegistrationForm gui = new RegistrationForm();
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add(gui);
frame.pack();
frame.setVisible(true);
}
});
}
}
我希望在启动程序时自动调用GUI
# 1 楼答案
移动注册表单后重试。java包javaui下的类文件