-7
 Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
at masterCustomer.initComponents(masterCustomer.java:32)
at masterCustomer.<init>(masterCustomer.java:11)
at MainFrame.<init>(MainFrame.java:19)
at loginForm.<init>(loginForm.java:17)
at MainFrame.<init>(MainFrame.java:20)
at loginForm.<init>(loginForm.java:17)
at MainFrame.<init>(MainFrame.java:20)
at loginForm.<init>(loginForm.java:17)
at MainFrame.<init>(MainFrame.java:20)
at loginForm.<init>(loginForm.java:17)

有谁知道如何解决这个问题?这个问题发生在我从netbeans生成setter和getter之后......

4

1 回答 1

4

问题是loginForm需要引用MainFrame, 反之亦然。你会在这 2 行得到一个无限循环:

 loginForm.java:17
 MainFrame.java:20
于 2012-12-14T14:37:18.437 回答