Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

StackOverlow with mouse listener.

it99Jan 11 2010 — edited Jan 11 2010
I have a JTable and with a checkbox in the column header and a mouse listener so I can tell when the checkbox has changed.
Whenever I try to resize one of the table column widths I will get a stack Overflow.
Even with all of the mouse listener methods empty. So it's nothing my listener is doing.
Is there any way around this problem? Thanks.


Uncaught Exception in thread "AWT-EventQueue-0"
java.lang.StackOverflowError
java.awt.AWTEventMulticaster.mouseExited(Unknown Source)
java.awt.AWTEventMulticaster.mouseExited(Unknown Source)
java.awt.AWTEventMulticaster.mouseExited(Unknown Source)


			if (table != null) {
				JTableHeader header = table.getTableHeader();
				if (header != null) {
					rendererComponent.setForeground(header.getForeground());
					rendererComponent.setBackground(header.getBackground());
					rendererComponent.setFont(header.getFont());

					header.addMouseListener(rendererComponent);
				}
			}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 8 2010
Added on Jan 11 2010
6 comments
303 views