![]() |
|
|
|||||||
![]() |
Java - Problems with JTable using fixed rows |
|
|
Thread Tools | Search this Thread |
|
|
#11 |
|
In article <hcsunv$u5s$03$>,
Michael Rauscher <> wrote: > Felix Natter wrote: > > Can you think of a way to get arounds this, like modifying the > > validation order? > > If my theory is true, the following should work > > tblSP = new JScrollPane(dataTable) { > public boolean isValidateRoot() { > return false; > } > }; Indeed, it works perfectly in Noel's example. Thanks! On review, I see that JRootPane, JScrollPane and JSplitPane all return true for isValidateRoot(). In contrast, JTextField's isValidateRoot() returns false when it's contained within a JViewport, perhaps for a similar reason. -- John B. Matthews trashgod at gmail dot com <http://sites.google.com/site/drjohnbmatthews> John B. Matthews |
|
|
|
|
#12 |
|
Posts: n/a
|
"John B. Matthews" <> writes:
> In article <hcsunv$u5s$03$>, > Michael Rauscher <> wrote: > >> Felix Natter wrote: >> > Can you think of a way to get arounds this, like modifying the >> > validation order? >> >> If my theory is true, the following should work >> >> tblSP = new JScrollPane(dataTable) { >> public boolean isValidateRoot() { >> return false; >> } >> }; > > Indeed, it works perfectly in Noel's example. Thanks! First of all thanks a lot for all the helpful replies, this solution works perfectly However, in order to make resizing columns work, the following is necessary: headerTable.setTableHeader(dataTable.getTableHeade r()); (I currently don't know why) However, when using the above line, the sorting method provided by Java 1.6 will not work any more. Luckily, the following solution for java 1.5 works perfectly: http://stackoverflow.com/questions/5...ws-in-java-1-5 Now everything works: column resizing, sorting, fixed rows, no update problems Thanks again! -- Felix Natter Felix Natter |
|
|
|
#13 |
|
Posts: n/a
|
Felix Natter wrote:
> "John B. Matthews" <> writes: > >> In article <hcsunv$u5s$03$>, >> Michael Rauscher <> wrote: >>> tblSP = new JScrollPane(dataTable) { >>> public boolean isValidateRoot() { >>> return false; >>> } >>> }; >> Indeed, it works perfectly in Noel's example. Thanks! In fact, it works for your SSCCE, too. > However, in order to make resizing columns work, the following is > necessary: > headerTable.setTableHeader(dataTable.getTableHeade r()); > (I currently don't know why) If you apply it to your SSCCE, resizing and sorting will work as expected. Bye Michael Michael Rauscher |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Massive computer problems...blue screens, restarts, beeping noises | =?Utf-8?B?RXJpYw==?= | Windows 64bit | 39 | 01-26-2007 06:45 PM |
| connection problems after restore point | dololly | Computer Support | 1 | 02-12-2006 08:05 PM |
| Problems with Games with 64 bit | Don Whaley | Windows 64bit | 5 | 09-11-2005 08:12 PM |
| MS Office problems with updating and saving files across the network. | Mark Acutt | Computer Support | 2 | 07-31-2003 02:50 PM |
| Re: windows 2000 sp4 is a must | PhilGreg | Computer Support | 0 | 07-17-2003 04:38 AM |