[ xframe-Bugs-1169153 ] JXTable.setModel doesn't work.
"SourceForge.net" <[email protected]> Sat, 02 Apr 2005 13:10:15 -0800
| Newsgroups | gmane.text.xml.xframe.xsddoc |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #1169153, was opened at 2005-03-23 16:04 Message generated for change (Comment added) made by kriede You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=454391&aid=1169153&group_id=48863 Category: JXTable Group: swing-0.0.1 Status: Open Resolution: Fixed Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Kurt Riede (kriede) Summary: JXTable.setModel doesn't work. Initial Comment: Hi. If I do this: JXTable t1 = new JXTable(new TestModel(), 2); The table looks as expected. But if I do: JXTable t2 = new JXTable(); t2.setFrozenColumns(2); t2.setModel(new TestModel()); It shows a columless table. And if I do: JXTable t3 = new JXTable(); t3.setModel(new TestModel()); t3.setFrozenColumns(2); It simply crashes. Hope you can give me a hint because I really need this.Thanks. ---------------------------------------------------------------------- >Comment By: Kurt Riede (kriede) Date: 2005-04-02 23:10 Message: Logged In: YES user_id=484961 Sorry haven't seen the missing headers. A fix is committed to CVS. Attached is a zip file of the updated src folder. Regards Kurt ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2005-04-02 01:08 Message: Logged In: NO Makes sence. Just one thing... t2 and t3 have a slight problem: they don't show header. ---------------------------------------------------------------------- Comment By: Kurt Riede (kriede) Date: 2005-03-31 10:45 Message: Logged In: YES user_id=484961 Works as designed. The maximum value for frozenColumns is the number of available columns. Since in t2 there is no model yet (and thus no columns) setFrozenColumns(2) simple does nothing. In t3 you first set the model so you're able to setFrozenColumns(2). Regards Kurt ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2005-03-29 20:47 Message: Logged In: NO Sorry, t3 DOES work, only t2 freezes no column ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2005-03-29 20:33 Message: Logged In: NO Ok, with this new source code: 1. t1 still works ;) 2. t2 doesn't crash anymore, but no frozen columns. 3. same for t3 ---------------------------------------------------------------------- Comment By: Kurt Riede (kriede) Date: 2005-03-29 10:17 Message: Logged In: YES user_id=484961 Sorry, there are some more changes since the last release. I attached a zip file containing the whole src folder. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2005-03-28 22:15 Message: Logged In: NO Sorry, I just noticed now you had replied (the bug was never assigned). I just tried it but it doesn't compile, it's asking for new methods (getLockedHeader() and getScrollHeader()) in JXTableHeader as well as a different constructor. Will you attach that file as well or should I get a later release? Thanks. ---------------------------------------------------------------------- Comment By: Kurt Riede (kriede) Date: 2005-03-23 16:48 Message: Logged In: YES user_id=484961 Thank you for the bug report. I just checked in a new example that reproduces your bug: see class net.sf.xframe.swing.demo.JXTableDemo3 in the samples folder There is now also a fix for the bug: class net.sf.xframe.swing.JXTable The problem was that when setting a new tabel model, the column model wasn't properly adjusted to the new model. Should work now, but is not yet extensivly tested. Please give us feedback. The modified file JXTable.java is also attached to this report. Regards Kurt ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=454391&aid=1169153&group_id=48863 ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click