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
2
votes
1 answer

JXTable: use a TableCellEditor and TableCellRenderer for a specific cell instead of the whole column

I have a JXTable compound of 6 columns and two of them are JCheckBox. I would like to have the following behavior: If the first checkbox is checked, the second checkbox is enabled and can be checked or not. If the first checkbox is unchecked, the…
ivan0590
  • 1,229
  • 11
  • 18
2
votes
0 answers

How can I use JXTable with JXSearchPanel for searching?

I've read that the JXTable has a built-in support to search the table in combination with JXSearchPanel or JXSearchField. Wehre can I find some examples or code snippets to see how it works? By the way: is there any possibility to disable the…
Ramses
  • 652
  • 2
  • 8
  • 30
2
votes
1 answer

Do SwingX components have translation for Arabic, Russian or Greek languages?

I'm using a JXTable that contains a search functionality when I press CTRL+F. If I have my locale defined to English or French, the default text of this search window is automatically translated to the active locale. If however I change it to any of…
ktulinho
  • 3,870
  • 9
  • 28
  • 35
2
votes
1 answer

SortController: how to use a dynamic filter

The JXTable from the SwingX project has a method to set a RowFilter directly on the JXTable (see JXTable#setRowFilter). It is unclear to me what you need to do when the filter implementation is dynamic. To compare: in the JDK they introduced the…
Robin
  • 36,233
  • 5
  • 47
  • 99
2
votes
2 answers

Two JXTables with same custom model - How to make cells editable in one table but non-editable in the second?

I have a custom table model whose data I want to edit in one JXTable, but view-only in a second JXTable. Can this be done without having two separate models? Is there some way of overriding model.isCellEditable for the view-only table? import…
shanesolo
  • 141
  • 1
  • 1
  • 6
2
votes
2 answers

JXTreeTable and JComboBox cell editor

How can I use JComboBox as cell editor in JXTreeTable? Can you give me a working example please?
joycollector
  • 1,986
  • 4
  • 17
  • 18
2
votes
1 answer

How to set a JTable column as String and sort as Double?

I'm still fairly new to Java and have a question in regards to JTable (more specifically JXTable) and sorting rows by column class with mixed data type... Let me elaborate... I have a JXTable that holds data for a product listing. This table has a…
titanic_fanatic
  • 593
  • 2
  • 5
  • 13
1
vote
2 answers

JXTable background image don't renders

I am trying to generate a JXTable with a background image ( a text would be fine as well). Here is my extended JXTable class: public class JXTableWithBackground extends JXTable{ ImageIcon image; public…
Anthea
  • 3,741
  • 5
  • 40
  • 64
1
vote
0 answers

Wrong highlighting while using a JXTable with the MatchingTextHighlighter

The basic question: While changing the width of a TableColumn the method SwingUtilities.layoutCompoundLabel(..) sets the parameter Rectangle textR to an old value (or 'the value before'). How could I get the current (real) Rectangle value? Some…
bobndrew
  • 395
  • 10
  • 32
1
vote
1 answer

DatePickerCellEditor resets the time when cell editing starts and stops

I have a JXTable with two columns that hold string values and one column that holds a date time value that follows this format: yyyy-MM-dd HH:mm:ss. Since I only care about the users changing the date, I thought I'd make use of DatePickerCellEditor…
Morgan
  • 907
  • 1
  • 13
  • 35
1
vote
1 answer

DefaultTableModel not accepting Object type

I have been trying to send some data from an Editable JComboBox to a JXTable. The code for it goes like this : private void selectTestActionPerformed(java.awt.event.ActionEvent evt) { JTextField…
mustangDC
  • 945
  • 1
  • 12
  • 33
1
vote
1 answer

Freeze columns in JXTable

I'd like to be able to freeze columns in JXTable just like in Excel spreadsheet and came across this project: xframe-swing's JXTable. Just wondering if there is a tutorial for this project. Note that this is not the same as JXTable in swingx…
rmartinus
  • 690
  • 1
  • 9
  • 14
1
vote
1 answer

Custom header renderer in JXTable?

I was using JTable#setDefaultRenderer to set custom rendered in Swing. As I understood, in SwingX this method should be passed an instance of DefaultTableRenderer. If I need a very custom drawing, I can initialize DefaultTableRenderer with my custom…
Suzan Cioc
  • 29,281
  • 63
  • 213
  • 385
1
vote
1 answer

How to use relative cell highlighting in SwingX?

I want to highlight cells in a org.jdesktop.swingx.JXTreeTable relative to the value inside like in the SwingX showcase under 'Highlighting (Extended)': There is some code provided in the showcase but I just can't get it to work, it doesn't…
Michael Kleimann
  • 502
  • 2
  • 10
1
vote
1 answer

How to Make empty row editable in JXTable

I have a jXTable that is linked to a MySQL database. I am using the DefaultTableModel. I have it so far that the user can edit the data in the table. I have been trying to add an "Insert New Row" button but was unsuccessful. In the meantime, I…
teppuus
  • 89
  • 2
  • 2
  • 8