Questions tagged [jtableheader]

JTableHeader is the Swing component which manages the header of the JTable.

JTableHeader is the Swing component which manages the header of the JTable. It displays the column headers and unlike other rows stays visible on top as the table scrolls vertically in JScrollPane.

JTableHeader also handles resizing, rearrangement and sorting of columns in response to mouse inputs.

201 questions
3
votes
2 answers

Vertical Table Header Cell Renderer

I used the Vertical Table Header Cell Renderer that is available in this site here It works great for me but I need a clue on how can I have in some headers that are vertically aligned multiple rows like this you can see in the image of the example…
Vagelism
  • 601
  • 1
  • 16
  • 27
3
votes
2 answers

JTable header alignment

I would like to set the vertical alignment of the label in the header of my JTable-derrived class. I am aware of setVerticalAlignment(SwingConstants.BOTTOM); My header is much higher than the font and I would like to place the text slightly below…
Adam
  • 637
  • 1
  • 8
  • 21
3
votes
3 answers

event for check box in jtable header

hi i have a jtable with checkbox in column and column header problem is if i click on the first column header, the first column header is select and the the second one String[] columnNames = {"Am", "Pm", "Integer", "String"}; Object[][] data…
redfox26
  • 2,020
  • 4
  • 25
  • 33
3
votes
1 answer

JTable: remove gridline on the rightmost column

I have a Jtable that looks like this now, and I'm trying to remove the grid line on the rightmost column. Is there any way to do this? Also the columns are swappable.
dosa
  • 635
  • 2
  • 6
  • 11
3
votes
2 answers

Empty JTables inside a scrollable (GridBagLayout) panel - header collapses on column resize

I'm attempting to create a "sectioned" table, which are actually multiple tables laid out within a "scrollable" JPanel via GridBagLayout. The tables share the same table model (class), table header and column model, the JTableHeader is set as column…
predi
  • 5,528
  • 32
  • 60
3
votes
5 answers

about column's width of a JTable in a JScrollPane

i want to set each column of a JTable in a JScrollPane with a fixed num width, but i cannot do it with infoTable.getColumnModel().getColumn(0).setPreferredWidth(10); i use the default layout of JScrollPane and add the table with the scrollPane's…
user415726
  • 159
  • 1
  • 4
  • 14
3
votes
1 answer

How to Display Row Header on JTable Instead of Column Header

How can i display my Jtable to this .. currently i only know to create this kind of jtable below is my code HERE Object rowData1[][] = { { "","","","" }, …
Ridzuan Adris
  • 1,192
  • 2
  • 13
  • 32
3
votes
3 answers

synchronize view of two JTable

I have two JTables one in main viewport and one in footer viewport, using JideScrollPane. the problem is when the main JTable's view is customized, the footer JTable remains the same, is there any way to synchronize their view? thanks.
Ramin
  • 474
  • 6
  • 22
3
votes
1 answer

JTable header renderer

I'm trying to make the background of my JTable header have a gradient. This works fine using the code: String[] colName = new String[] { "#", "Location", "Name" ,"Source", "System", "Hits", "Current", "Time" }; Object[][] products =…
Alosyius
  • 8,771
  • 26
  • 76
  • 120
3
votes
3 answers

Set a column width of JTable according to the text in a header

I need to get an appropriate table size according to a text in a header. It contains abbreviations of czech names of days like: "Po", "Út", "St", atc. but instead of this three dots are displayed. I have this code: width, height - max of all minimum…
Daniel Katz
  • 2,271
  • 3
  • 25
  • 27
3
votes
2 answers

JTable Header format

I want to change the header of my JTable that displays the data from SQL Server database because it also display the same column name on my database. I just need the Data itself, not the column name. here is the code that I used to display the…
Crystal Maiden
  • 372
  • 1
  • 7
  • 23
3
votes
2 answers

Make UITableView tableHeaderView clear, with all other cells white

My UITableView spans the the size of the iPhone view, with a tableHeaderView holding additional content. Wanting the header to be clear and the rest of the table white, I set the background colour of the table to clear, and inside the view delegate…
MechEngineer
  • 1,399
  • 3
  • 16
  • 27
2
votes
3 answers

How to increase the Font of the title column in JTable Swing?

I would like to know how to increase the Font size of the title column in JTable Swing? I'm usning Netbeans. Best regards. Daniel
Daniel Pereira
  • 435
  • 2
  • 7
  • 13
2
votes
1 answer

Correctly sizing the header for one column of a JTable

I have a table with 3 columns and want the first one to be the minimum size needed. The header is "Level" and seems to be 25-29 pixels depending on the font/OS I use. However the table header seems to require at least 35 on Windows and 52 on Mac to…
Sean Dawson
  • 232
  • 3
  • 13
2
votes
2 answers

Look-and-feel issue when centering JTable column header

I am using the following code: public final class TableCellRendererCenter extends DefaultTableCellRenderer { public static final TableCellRenderer INSTANCE = new TableCellRendererCenter(); protected TableCellRendererCenter()…
Jérôme Verstrynge
  • 57,710
  • 92
  • 283
  • 453
1 2
3
13 14