Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #37631
| Newsgroups | comp.lang.java.programmer |
|---|---|
| Date | 2017-10-31 13:20 -0700 |
| References | <9c0544b7-72d4-4125-8f50-d7d0fb1a8aab@googlegroups.com> <ot0dv5$1mlb$1@gioia.aioe.org> <a54508c4-658a-4ef4-8b71-2257d4bbef65@googlegroups.com> |
| Message-ID | <628ca4f3-bade-41ce-822e-97b078a38f19@googlegroups.com> (permalink) |
| Subject | Re: Fixed row table |
| From | Eric Douglas <e.d.programmer@gmail.com> |
On Monday, October 30, 2017 at 7:49:25 AM UTC-4, Eric Douglas wrote: > 500 lines is fairly short for what this is. > My problem here is how to get the row selection model. I combined 2 tables to make a fixed row table. The bottom one is scrollable, the top one is not. Now I need the 2 tables to share, so if we set single row selection mode you can only select one row between the 2 of them, and if the top table has 2 rows and we call setSelectedRow(2) it should select the first row of the second table... > > https://pastebin.com/zrUESqc4 I am making good progress on this. It's just that I made a custom table which is an extension of JTable, and when I tried to freeze rows the only solution that came up was to embed a second JTable. Then I tried to override methods like getRowCount() to include both tables which cascaded into trouble, seems like more trouble than it's worth to make that work properly, so I just need custom method names for any JTable methods I need to "override" which need to refer to both tables. I just thought that would be confusing, to have the JTable methods like getSelectedRows() referencing only the dynamic table and have to call custom methods (getAllSelectedRows()? getSelectedViewRows()?) to pull indexes from both tables as if they're one table.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Fixed row table Eric Douglas <e.d.programmer@gmail.com> - 2017-10-27 12:20 -0700
Re: Fixed row table Arne Vajhøj <arne@vajhoej.dk> - 2017-10-27 19:03 -0400
Re: Fixed row table Arne Vajhøj <arne@vajhoej.dk> - 2017-10-27 19:04 -0400
Re: Fixed row table Eric Douglas <e.d.programmer@gmail.com> - 2017-10-30 04:49 -0700
Re: Fixed row table Eric Douglas <e.d.programmer@gmail.com> - 2017-10-31 13:20 -0700
Re: Fixed row table Joerg Meier <joergmmeier@arcor.de> - 2017-10-28 23:33 +0200
csiph-web