|JTable header invisible when created by addColumn() [message #1060408]
||Fri, 24 May 2013 13:55
| Markus Schütz
Registered: March 2012
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?
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 14:13]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.02486 seconds