• Post Reply Bookmark Topic Watch Topic
  • New Topic

StackOverflowError Please Help!  RSS feed

 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!