Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

StackOverflowError in LinkFollower

 
okinrus N/A
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone determ why first code does not have a StackOverflowError while the second one does? Tab and HistoryTracker are class with static members that gives an interface to a global JTabbedPane object and history tracking. The HyperScrollPane is a subclass of the JScrollPane and looks like this


Code 1:

Code 2:
 
okinrus N/A
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Solved it. LinkFollower constructor was being called recursively.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic