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后发生这个问题...
答案 0 :(得分:4)
问题在于loginForm
需要引用MainFrame
,反之亦然。在这两行中你得到一个无限循环:
loginForm.java:17
MainFrame.java:20