Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #37609
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Daniele Futtorovic <da.futt.news@laposte.net> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: How do you update the view space of a JTable? |
| Date | Mon, 30 Oct 2017 17:41:11 +0100 |
| Organization | A noiseless patient Spider |
| Lines | 17 |
| Message-ID | <ot7kpq$koi$1@dont-email.me> (permalink) |
| References | <8a75cc49-c369-41bb-8e5e-254977d4e410@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Mon, 30 Oct 2017 16:42:34 -0000 (UTC) |
| Injection-Info | reader02.eternal-september.org; posting-host="2b2ce65d021a554ecacc5faac2b078bd"; logging-data="21266"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Zt/U44gVN8fZYYWS5Uxwb" |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
| In-Reply-To | <8a75cc49-c369-41bb-8e5e-254977d4e410@googlegroups.com> |
| X-Antivirus-Status | Clean |
| Content-Language | en-GB |
| X-Antivirus | AVG (VPS 171030-0, 10/30/2017), Outbound message |
| Cancel-Lock | sha1:l7G7BAyAtFrdaJ6KaU9K//a6e7Y= |
| Xref | csiph.com comp.lang.java.programmer:37609 |
Show key headers only | View raw
On 2017-10-17 17:47, Eric Douglas wrote: > If I call setFillsViewportHeight(true) it doesn't paint the entire view space of the JScrollPane if the table doesn't have enough rows to fill it. > > I'm calling setFillsViewportHeight(false), and I'm overriding the BasicTableUI.paint() to do some custom cell drawing, but within this method the getClipBounds() of the Graphics is only returning the size of the rows. How do I increase this size? I've tried calling and overriding every method I can think of that should affect the size but it doesn't change. The only other thing I know of is to call setFillsViewportHeight(true) and have to clear any unused space. > Set a background for your scroll pane. Alternatively, you could mess with the TableModel to make it seem like there's more rows than you have data, but that's likely not the best idea. Mind rule #5008: if an established API like Swing repeatedly gets in the way of what you're trying to do, there's a good chance what you're trying to do is not a good idea. -- DF.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How do you update the view space of a JTable? Eric Douglas <e.d.programmer@gmail.com> - 2017-10-17 08:47 -0700
Re: How do you update the view space of a JTable? Eric Douglas <e.d.programmer@gmail.com> - 2017-10-18 06:11 -0700
Re: How do you update the view space of a JTable? Daniele Futtorovic <da.futt.news@laposte.net> - 2017-10-30 17:41 +0100
Re: How do you update the view space of a JTable? Eric Douglas <e.d.programmer@gmail.com> - 2017-10-30 10:29 -0700
Re: How do you update the view space of a JTable? Daniele Futtorovic <da.futt.news@laposte.net> - 2017-10-31 11:10 +0100
Re: How do you update the view space of a JTable? Eric Douglas <e.d.programmer@gmail.com> - 2017-10-31 04:46 -0700
Re: How do you update the view space of a JTable? Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-10-31 07:59 -0400
Re: How do you update the view space of a JTable? Eric Douglas <e.d.programmer@gmail.com> - 2017-10-31 05:21 -0700
Re: How do you update the view space of a JTable? Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-10-31 08:32 -0400
Re: How do you update the view space of a JTable? Eric Douglas <e.d.programmer@gmail.com> - 2017-10-31 06:13 -0700
Re: How do you update the view space of a JTable? Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-10-31 17:13 -0400
Re: How do you update the view space of a JTable? Daniele Futtorovic <da.futt.news@laposte.net> - 2017-10-31 23:33 +0100
Re: How do you update the view space of a JTable? Eric Douglas <e.d.programmer@gmail.com> - 2017-11-01 06:29 -0700
Re: How do you update the view space of a JTable? Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-11-01 10:37 -0400
Re: How do you update the view space of a JTable? Eric Douglas <e.d.programmer@gmail.com> - 2017-11-01 08:37 -0700
Re: How do you update the view space of a JTable? Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-11-01 13:20 -0400
csiph-web