Questions tagged [jxtable]

An enhanced Table component in Java, with support for general SwingX sorting/filtering, rendering, highlighting, rollover and search functionality

A JXTable is a JTable with built-in support for row sorting, filtering, and highlighting, column visibility and a special popup control on the column header for quick access to table configuration. It can be instantiated just like a JTable, using a TableModel. However, a JXTable automatically wraps TableColumns inside a TableColumnExt instance. TableColumnExt supports visibility, sortability, and prototype values for column sizing, none of which are available in TableColumn.

Javadocs found here.

80 questions
8
votes
2 answers

Why is JXTable losing input where JTable is not?

When I'm using a JXTable to render and edit my data, some input into the CellEditors gets lost. If I click on the Resizing-Divider of the JXTable-ColumnHeader or change the width of the JFrame, the CellEditor gets terminated without commiting the…
bobndrew
  • 395
  • 10
  • 32
6
votes
3 answers

Sorting JXTable with SwingX

I am using JXTable which is from SwingX components. If I use setSortable(boolean flag) method then it will enable or disable sorting for all columns. As of my requirement I want to disable sorting for a few columns and enable sorting for other…
user711466
  • 109
  • 1
  • 3
6
votes
1 answer

Swing: table cell rendering doesn't work right for JXTable?

I'm trying to override the highlight color of a JXTable based on the value of certain row items. Here's an example where the highlight is green if the row item value has getNumber() % 2 == 0. It works fine for JTable, but for JXTable, it looks like…
Jason S
  • 184,598
  • 164
  • 608
  • 970
5
votes
1 answer

Issue with a JComboBox in a JXTable

I am trying to make a column in a JXTable to be a combo box. Its difficult to explain the problem I am facing. When you click on the drop down, at times the drop down does not stay open long enough for you to choose the value. It just closes and…
sethu
  • 8,181
  • 7
  • 39
  • 65
5
votes
1 answer

Merging cells in a JXTreeTable

I want to merge two cells in a JXTreeTable. Is this possible? I have read the solution for Merging cells in JTable, but this does not work for JXTreeTables. What I mean with merging cells: I want to create a structure like this: node 1    |…
Fortega
  • 19,463
  • 14
  • 75
  • 113
5
votes
1 answer

prevent sorting of top 3 rows in jxtable

I have a JXtable. I would like to prevent the top 3 rows from being sorted. Basically the top 3 rows should always be on top and the remaining ones should be sorted according to their value. There is a similar question on SO but i am not sure how to…
codeNinja
  • 1,442
  • 3
  • 25
  • 61
5
votes
4 answers

How to set column width in JTable/JXTable?

My application consists of several JTables resp. JXTables. The goal is to store column width and reload them on start up. But the following code does nothing change on the column widths of the tables: tblTasks.getColumn(1).setWidth(36); and also…
salocinx
  • 3,715
  • 8
  • 61
  • 110
5
votes
1 answer

How to handle table which sorting and adding data parallel?

I am facing problem of duplicate rows in the JXTable. If I sort the JXTable data while the new rows are being inserted in JXTable, the final result in JXTable shows duplicate rows that make invalid result in table. Even it also shows correct count…
Tej Kiran
  • 2,218
  • 5
  • 21
  • 42
4
votes
3 answers

JXTable with DefaultTableCellrenderer and alternate striping highlighter

I updated to SwingX-1.6.2 but found problems that didn't appear in 1.6. The colors of the JXTable cells looks odd. I use a highlighter with an alternate striping (HighlighterFactory.createAlternateStriping) for the colors and a subclass of…
Stephan
  • 4,395
  • 3
  • 26
  • 49
4
votes
1 answer

JXTable - Highlighter after filtering table

Info - for better formatting, I used code-formatting throughout the whole posting. Hi, I have a highlighted JXTable. Rows are highlighted, depending on the value of a specific column (c2). Everytime the value of column c2 changes, the color is…
Kai Mechel
  • 753
  • 8
  • 19
4
votes
2 answers

JXTable listen to sort and sort a similar table the same way

I have a number of JXTables which all have the same columns (but different data). You can sort the data by clicking on one the header of one of the columns. What I want now, is that the other tables are sorted the same way when clicking on the…
Fortega
  • 19,463
  • 14
  • 75
  • 113
3
votes
1 answer

JXTable column sorting changes between 1.0 and 1.6

I recently updated the SwingX library in an application from version 1.0 to 1.6.2 since we updated to JDK1.6 . I know the sorting has been changed to re-use some of the Core JDK components which were introduced in JDK 1.6 . However, in version 1.0…
Robin
  • 36,233
  • 5
  • 47
  • 99
3
votes
1 answer

Column dividers in JTable or JXTable

I Have a JTable (or a JXTable to be more precise) with 3 sections of grouped columns I want to divide. I used to have 3 tables which i programmatically linked (the scrollbar position, the sorting, the selection). I used a lot of code to get this…
michel.iamit
  • 5,788
  • 9
  • 55
  • 74
3
votes
1 answer

JXTable convertRowIndexToModel wrong result after sort?

I have a JXTable in which a model is a List of distinct objects. There is a problem when I try to map the view index to model index after sorting the view by the selected column header. Using this code, int[] selecteds =…
secmask
  • 7,649
  • 5
  • 35
  • 52
3
votes
2 answers

jxtable with on gridline that is thicker

I have a jxtable. It has horizontalGridLines enabled. here is what it looks like. I want the horizontal gridline to be thicker. See the desired look below. The line after the 2nd row should have a thicker divider.
codeNinja
  • 1,442
  • 3
  • 25
  • 61
1
2 3 4 5 6