Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #36651

Re: How are you supposed to set JTable height?

Newsgroups comp.lang.java.programmer
Date 2017-05-22 06:42 -0700
References (4 earlier) <266d8f3d-b922-42d4-b3c1-f00e8a95574d@googlegroups.com> <80c877a7-0ea7-4869-ace6-54bb6fb04c16@googlegroups.com> <ofpasc$rti$1@dont-email.me> <961818ff-485d-49dd-8c3d-e0558911cf94@googlegroups.com> <ofun7i$m5l$1@dont-email.me>
Message-ID <5f3ffc95-aa9c-4e39-b810-5bf5d25b5a44@googlegroups.com> (permalink)
Subject Re: How are you supposed to set JTable height?
From Eric Douglas <e.d.programmer@gmail.com>

Show all headers | View raw


On Monday, May 22, 2017 at 9:00:56 AM UTC-4, Eric Sosman wrote:
> On 5/22/2017 7:55 AM, Eric Douglas wrote:
> > On Saturday, May 20, 2017 at 7:59:28 AM UTC-4, Eric Sosman wrote:
> >>
> >>       I can't help you with this part, since I've never tried to mess
> >> with the plaf layers.  On the other hand, I've never needed to: For
> >> filtering, sorting, and custom-painting rows and cells, I've just
> >> used RowFilter, TableRowSorter, and sometimes a customized
> >> TableCellRenderer or TableCellEditor.  These have met my needs
> >> without recourse to mucking about in the lower levels.
> >>
> > 
> > RowFilter doesn't work unless getRowCount() only returns the amount of visible rows.
> > I want the user to be able to filter on values in one column, but I still want to get and set values in another column including the rows they don't see.
> 
>      I don't know which of the several getRowCount() methods you
> refer to: That of JTable, or of TableModel, or of any of several
> other table-related classes and interfaces.  But in any event,
> all I can say is that RowFilter and TableRowSorter have worked
> just fine without me needing to worry about what's visible and
> what's not.  It seems probable that you're doing something far
> more intricate than I've ever attempted, so I'll have to bow out.
> 
That of JTable, which has to match the filter.
I call methods on the table to get and set values, which makes sense when we want to process only what the user sees as they're seeing them.  Normally sort order is not an issue.  In this case I want the user to be able to filter so they only see some of the rows, but there is another process linked to the table which needs to get and update all the rows, so either it needs to get the model to work directly with the data which I don't otherwise do, or it needs methods on the table that work with model row values instead of view rows.

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How are you supposed to set JTable height? Eric Douglas <e.d.programmer@gmail.com> - 2017-05-19 07:20 -0700
  Re: How are you supposed to set JTable height? Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-05-19 11:22 -0400
    Re: How are you supposed to set JTable height? Eric Douglas <e.d.programmer@gmail.com> - 2017-05-19 10:45 -0700
      Re: How are you supposed to set JTable height? Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-05-19 14:29 -0400
        Re: How are you supposed to set JTable height? Eric Douglas <e.d.programmer@gmail.com> - 2017-05-19 11:42 -0700
          Re: How are you supposed to set JTable height? Eric Douglas <e.d.programmer@gmail.com> - 2017-05-19 13:06 -0700
            Re: How are you supposed to set JTable height? Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-05-20 07:59 -0400
              Re: How are you supposed to set JTable height? Eric Douglas <e.d.programmer@gmail.com> - 2017-05-22 04:55 -0700
                Re: How are you supposed to set JTable height? Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-05-22 09:00 -0400
                Re: How are you supposed to set JTable height? Eric Douglas <e.d.programmer@gmail.com> - 2017-05-22 06:42 -0700
                Re: How are you supposed to set JTable height? Eric Douglas <e.d.programmer@gmail.com> - 2017-05-22 09:18 -0700
                Re: How are you supposed to set JTable height? Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-05-22 17:15 -0400

csiph-web