We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,965 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Swing Stack Over Flow Exception

Hi,

I have created a table with first column as checkbox.
Using the below Code..

    TableColumn tc = constructedTable.getColumnModel().getColumn(0);
    tc.setCellEditor(constructedTable.getDefaultEditor(Boolean.class));
    tc.setCellRenderer(constructedTable.getDefaultRenderer(Boolean.class));
    tc.setHeaderRenderer(new CheckBoxHeader(new MyItemListener()));

I sometimes get stackoverflow exception.
Is This beacause of the above code..?

3
Contributors
2
Replies
12 Hours
Discussion Span
7 Months Ago
Last Updated
3
Views
Hrithik516
Newbie Poster
21 posts since Sep 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Can't pin point the exception cause by looking at that small piece of codes... Usually, it is from a loop that does not end properly. As a result, the program keeps creating references/objects in the memory. I used the word references because it includes more than just Java objects.

Taywin
Posting Maven
2,633 posts since Apr 2010
Reputation Points: 275
Solved Threads: 375
Skill Endorsements: 17

Stack overflow is usually caused by recursively calling a method from itself. (Too many objects created normally throws a OutOfMemoryError exception, not a stack obverflow.) The error messgae tells you the exact line in your code where it happened. Without that info we can't do anything.

JamesCherrill
... trying to help
Moderator
8,516 posts since Apr 2008
Reputation Points: 2,583
Solved Threads: 1,455
Skill Endorsements: 30

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0728 seconds using 2.7MB