| JTable header invisible when created by addColumn() [message #1060408] |
Fri, 24 May 2013 09:55  |
Markus Schütz Messages: 6 Registered: March 2012 |
Junior Member |
|
|
It seems like WindowBuilder does not display table headers if they were created by calling JTable.addColumn().
The left shows a table created using setModel() and the right a table created using addColumn()

At runtime, they both look the same.

I've attached the test code as TableTest.java.
Is there any way to make it work without big code changes?
EDIT:
In addition, if you define a subclass of JTable (CustomTable.java), initialize it with addColumn() and then add this subclassed table somewhere (CustomTablTest.java), the headers will be visible. But only if the subclass has been defined in its own file! When I moved the subclass definition inside the CustomTableTest class, it did not work.
[Updated on: Fri, 24 May 2013 10:13] Report message to a moderator
|
|
|
| Re: JTable header invisible when created by addColumn() [message #1060502 is a reply to message #1060408] |
Sat, 25 May 2013 10:04  |
Eric Clayberg Messages: 778 Registered: July 2009 Location: Boston, MA |
Senior Member |
|
|
WindowBuilder does not currently support the addColumn() method, so it does not try to parse it.
Since addColumn() is not a simple JavaBean property, special design-time support would need to be added for it.
I would suggest adding a feature request to Bugzilla describing the need so that we can track it for future work. WB is open source, so we would certainly welcome a patch that added that capability.
|
|
|
Powered by
FUDForum. Page generated in 0.01566 seconds