jtable

JTable: grabbing data ?

how can you parse all the data from table model, so that it can readily be loaded and displayed easily as JTable ? for example, with the loaded JTable, I drag and drop the columns to change the orders. How would I get all of the table information ? Is there a certain standard to store this data in so it can easily be read by the next J...

How do I write an addElement method for a custom Model class extending AbstractTableModel?

For a hw assignment, I need to setup a JTable in Swing, and populate the table's contents via a custom model class that extends the AbstractTableModel. My questions regarding this overly complicated process are many fold, but I'll try and keep it simple. My first step is to get data into the model right? When I was using a JList (I coul...

Custom TableCellRenderer not working (table row rendering)

Hi, I'm trying to render an specific row of my jtable (it should have a different background color and it should have bold characters). I found several questions regarding how to implement a custom TableCellRenderer (here and here) and the tutorial How to Use Tables and this one (Table Row Rendering). I'm using a JInternalFrame to dis...

JList with custom cell renderer vs Jtable

My current application uses a JList and everything is well (the only customization I did was to set the italic font on some of the rows). Now I want to "upgrade" the user interface and instead of just labels in the List, I want a checkbox and a text field to be able to update the entry. I started changing the code and adding a custom c...

What Java table components exist?

Hello! In the world of Delphi, there are several very good table components, each with interesting features and a individual look and feel. Now i switched to Java development and JTable feels very "basic" to me. Are there any feature-rich free or commercial table components available for Java? Thanks, David ...

Java - Problem with filtering on a JTable

Well guys, here i am. In three days i couldn't resolve this problem. (I'm italian, sorry for my english). Shortly. I have a panel on which there is a JTable that show a mp3 list. Then another panel whith a JComboBox (with it i can choose the type of filter), a JTextField (where i write what i want to search/filter), and a JButton that ...

Get correct editing behaviour in JTable using java DefaultCellEditor

You can go into a cell in a Jtable either by clicking on it, or by going into it using cursor keys/tabs. With defaultCellEditor and a JtextField if you go in using cursor keys the caret is put at the end of the existing text field, whereas if you double click the field it will highlight the last word. Whereas spreadsheets seem to work ...

Problem getting focus when use JPanel as JTable cell editor

I have a cell editor that contains a little button that can be double clicked on to bring up an edit dialog, and then a textfield that can be used to edit the value inline (the popup is required to allow editing of additional values, only the first is shown in the JTable). When user clicks on field everything is okay, but if they tab in...

hi, i want to add rows dynamically to my JTable that is alredy filtered?

im using Jtable and i filtered rows but i cant add aditional rows dynamically pls any one help me..Thank you. ...

JTable cell not reflecting changes, though editable

For a custom TableModel, I am overriding isCellEditable, which is returning true always. I am also overriding setValueAt, but don't know how to use the method, so that, JTable reflects the changes done by editing. Below is the modified code for PersonTableModel :- class PersonTableModel extends AbstractTableModel{ public int getR...

JTable cell loses focus after run an action on selected cells if use keyboard shortcut and temporaily disable the JTable

In my JTable I have a number of actions that can accessed via popup menu or by selecting the configured shortcut. Selecting the action from the popup using mouse or keyboard is fine, and I can use the cursor keys to move to a field next to the original selection no problem. However if I use the shortcutkey instead it performs the action ...

how to obtain excel-like JTable headers

Hello, I would like to create a JTable whose global layout would look somewhat like excel's. Here is an example of what I am trying to obtain (top) and where I am at the moment(bottom). To get this result I used the Groupable Header's code from crionics.com, but as you can see components of the header are not aligned vertically. Moreo...

Display data from database as a row in JTable not as a column

Hello I would like to display the column that i have in the database as a row in my JTable please. Is it possible to do that? I am using hibernate and defaulttable model. For eg: I have character_no in my database as a column and it displays on my JTable as follows(on query). Character_no 23 34 21 6 7 . . and so on What I would like...

JComboBox in JTable Cell not showing up

Hi, i'm trying to edit the content of the cells of a certain column in my JTable with ComboBoxes. Therefore i simply use the code from the official Java Tutorial on JTables (http://download.oracle.com/javase/tutorial/uiswing/components/table.html). The relevant code ends up looking like this: tableModel = new NetworkTableModel(columnN...

How to make JTable cells default to overwrite mode

JTable cells by default are in append mode when the cell is double clicked on. Is there a way to make the cell default to overwrite mode instead, IOW, select the contents of the cell so that if the user started typing the old text would be replaced by the new text without having to manually erase it? ...

Java JTable Resize Row

Is it possible by default to resize a JTable row in the same way you can resize a column by dragging the mouse at the header? If so, how can you do this? ...