从另一个类调用方法并修改其变量

发布于 2024-12-23 18:51:21 字数 29220 浏览 0 评论 0原文

仍在学习使用 java 实例的正确方法,但我很难从一个类调用另一个类的方法:

/*/

public class MainView extends CustomComponent{

  private Panel viewPanel;

  /*Method i am trying to call*/
  public Panel getPanel{
    return this.viewPanel;
   }
 }


Public class FormView extends CustomComponent{

   private MainView mview;    
   private Panel tempPanel;

    public FormView(){

     buildLayout(); 
     mView = new MainView();  /// Stackoverflow Error
     tempPanel = mView.getPanel(); // Stackoverflow Error
    } 
}

当我尝试访问 MainView 时,我遇到了无限循环“面板”变量?

堆栈跟踪:

org.bixin.dugsi.web.DugsiManagerApplication.createLoginWindow(DugsiManagerApplication.java:49)
        at org.bixin.dugsi.web.DugsiManagerApplication.init(DugsiManagerApplication.java:28)
        at com.vaadin.Application.start(Application.java:554)
        at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.startApplication(AbstractApplicationServlet.java:1213)
        at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:484)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:359)
        at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:275)
        at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
        at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
        at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:344)
        at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:272)
        at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:81)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:395)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:250)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:166)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:680)
    java.lang.RuntimeException
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:288)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.LoginForm.<init>(LoginForm.java:448)
        at org.bixin.dugsi.web.LoginWindow.<init>(LoginWindow.java:14)
        at 

Still learning the proper way to use instances with java and i am having a difficult time calling a method from one class to another:

/*/

public class MainView extends CustomComponent{

  private Panel viewPanel;

  /*Method i am trying to call*/
  public Panel getPanel{
    return this.viewPanel;
   }
 }


Public class FormView extends CustomComponent{

   private MainView mview;    
   private Panel tempPanel;

    public FormView(){

     buildLayout(); 
     mView = new MainView();  /// Stackoverflow Error
     tempPanel = mView.getPanel(); // Stackoverflow Error
    } 
}

I am running into an infinite loop when i try to access the MainView 'Panel' variable?

Stack Trace:

org.bixin.dugsi.web.DugsiManagerApplication.createLoginWindow(DugsiManagerApplication.java:49)
        at org.bixin.dugsi.web.DugsiManagerApplication.init(DugsiManagerApplication.java:28)
        at com.vaadin.Application.start(Application.java:554)
        at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.startApplication(AbstractApplicationServlet.java:1213)
        at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:484)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:359)
        at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:275)
        at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
        at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
        at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:344)
        at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:272)
        at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:81)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:395)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:250)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:166)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:680)
    java.lang.RuntimeException
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:288)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.AdministrationView.<init>(AdministrationView.java:290)
        at org.bixin.dugsi.web.ui.MainView.<init>(MainView.java:417)
        at org.bixin.dugsi.web.ui.LoginForm.<init>(LoginForm.java:448)
        at org.bixin.dugsi.web.LoginWindow.<init>(LoginWindow.java:14)
        at 

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

旧情别恋 2024-12-30 18:51:21

显然你有一个递归初始化问题。

MainView 创建任何AdministrationView,它创建一个MainView,它创建一个AdministrationView 等等。

由于您没有显示 MainView 的构造函数,它位于超类的构造函数 (CustomComponent) 中或该类中的字段或您未向我们显示的代码中 ( MainView 的构造函数。)

You obviously have a recursive initialization problem.

MainView creates whatever AdministrationView is which creates a MainView which creates an AdministrationView and so on.

Since you don't show a constructor for MainView it's in the super class' constructor (CustomComponent) or a field in that class or in code you're not showing us (The constructor for MainView.)

往事风中埋 2024-12-30 18:51:21
public Panel getPanel() { //<----add parenthesis to make this a method!
  return this.viewPanel;
 } 

您需要添加括号才能调用方法 getPanel()

public class FormView extends CustomComponent{ //changed Public to public (no capital P)

您可能指的是公共而不是公共。当 Public 具有大写 P 时,编译器将尝试将 Public 解释为变量或函数名,而不是关键字。

 mView = new MainView();  /// Stackoverflow Error
 tempPanel = mView.getPanel(); // Stackoverflow Error

在我看来,第一行很好,因为它只会调用默认构造函数并初始化所有变量在类中设置为 null,第二个将仅返回 null,因为这就是 viewPanel 的初始化方式。

问题可能出在您尚未发布的 CustomComponent 类中的某个位置。正如我之前的其他人已经说过的那样,发布它和堆栈跟踪将帮助我们帮助您。 :D

public Panel getPanel() { //<----add parenthesis to make this a method!
  return this.viewPanel;
 } 

You need to add parenthesis in order for you to be able to call the method getPanel().

public class FormView extends CustomComponent{ //changed Public to public (no capital P)

You probably meant public instead of Public. The compiler is going to try to interpret Public as a variable or function name instead of a keyword when it has a capital P.

 mView = new MainView();  /// Stackoverflow Error
 tempPanel = mView.getPanel(); // Stackoverflow Error

It appears to me that the first line is fine as it will just invoke the default constructor and initialize all of the variables in the class to null, and the second one will merely return null since that's how viewPanel was initialized.

The problem probably lies somewhere in your CustomComponent class that you haven't posted yet. As others before me have already said, posting it and a stack-trace would help us help you. :D

情绪失控 2024-12-30 18:51:21

我想你的stackoverflow错误的主要原因是MainView和FormView都继承了CustomComponent,所以当调用构造函数方法时,它也会执行CustomComponent的构造函数方法两次!!,但我不能提供更多细节,因为我我对 CustomComponent 一无所知

I suppose that the main reason for your stackoverflow error is both the MainView and FormView are inherited the CustomComponent so when the constructor method is invoked,it will also execute the CustomComponent's constructor method twice!!,but I can't give more details because I am ignorant with the CustomComponent

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文