• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

StackOverflowError Please Help!

 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey guys, I just started creating a simple program, I'm getting the StackOverflowError and I'm curious on how I can fix it. Your help would be appreciated it. This is what the error looks like in eclipse:

Exception in thread "main" java.lang.StackOverflowError
at com.grammerpro.settings.AdjusterGui.<init>(AdjusterGui.java:15)
at com.grammerpro.screen.ActionHandlers.<init>(ActionHandlers.java:17)

And it repeats that over and over, as if it were in a loop.

The code for AdjusterGui:



The code for ActionHandlers:



I'm just simply running this to make sure everything is going smoothly before I add in any contents, so help with this would be most appreciated.
 
Ranch Hand
Posts: 331
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your class AdjusterGui extends ActionHandlers and within your ActionHandlers constructor youre instantiating a new AdjusterGui which causes the endless loop
 
reply
    Bookmark Topic Watch Topic
  • New Topic