Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #36642
| Newsgroups | comp.lang.java.programmer |
|---|---|
| Date | 2017-05-19 07:20 -0700 |
| Message-ID | <5749752d-bc83-4fb5-9abc-1a255e213a29@googlegroups.com> (permalink) |
| Subject | How are you supposed to set JTable height? |
| From | Eric Douglas <e.d.programmer@gmail.com> |
Step 1: start with a test table. I used the one in the answer on this thread: http://stackoverflow.com/questions/31886010/how-to-show-hide-different-row-sections-in-a-jtable Step 2: at the end of the main section, set a row height. table.setRowHeight(2,35); Run test and see there is a row that is taller. Step 3: fire change. ((AbstractTableModel) table.getModel()).fireTableDataChanged(); I thought this was supposed to tell the table to repaint because a cell got a different value, but this is losing the row height I just set.
Back to comp.lang.java.programmer | Previous | Next — Next in thread | Find similar | Unroll 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