JTable's cell double click question...

Hello everyone,
My JTable has some cells with icons and text, and some contains only text.
All cells are editable, so double clicking on it goes to "edit mode" where user enters new value for the cell.
Here is my question: Can I somehow determine if user has clicked on an icon?
What I'm trying to do is to put additional information for cell (some comment), and if comment exists, icon will appear.
Double clicking on that icon, dialog will show that comment.
Thanks in advance!

You did not mention that before. ...You are absolutely right, I didn't.
Let me emphasize importance of this:
Can I somehow determine if user has clicked on an icon?
And when I said "clicked" I mean double click when entering edit mode
of a cell.
If I could somehow determine that, I could than
perform desired action (open a dialog, or something else).
Thank you for your help so far.

Similar Messages

  • Resize JTable columns by double-clicking header

    I want to implement column resizing in a JTable so that when the user double clicks on the column header with the mouse in the "resize zone" the column automatically adjusts to the width of the longest text in the column. this is how many applications behave (e.g. windows explorer) but I don't think I've ever seen a swing app that does this. I've looked in the API docs for JTable and JTableHeader and I can't see any way of finding out if the mouse is over the edge of a column header. does anyone know of a way to do this?

    Is this laf independant?import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.table.*;
    public class Test extends JFrame {
      public Test() {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        Container content = getContentPane();
        String[] head = {"One","Two","Three"};
        String[][] data = {{"R1-C1","R1-C2","R1-C3"},
                {"R2-C1","R2-C2","R2-C3"},
                {"R3-C1","R3-C2","R3-C3"}};
        JTable jt = new JTable(data, head);
        JScrollPane jsp = new JScrollPane(jt);
        content.add(jsp, BorderLayout.CENTER);
        JTableHeader jth = jt.getTableHeader();
        jth.addMouseListener(new MouseAdapter() {
          public void mouseClicked(MouseEvent me) {
            JTableHeader jth = (JTableHeader)me.getSource();
            int col = jth.columnAtPoint(me.getPoint());
            Rectangle r = jth.getHeaderRect(col);
            if (jth.getCursor().equals(Cursor.getPredefinedCursor(Cursor.E_RESIZE_CURSOR))) {
              System.out.println("Cursor, col="+col);
        setSize(300, 300);
        setVisible(true);
      public static void main(String args[]) { new Test(); }
    }

  • Mouse left double click question

    Hello all...
    Well, my son seems to have done something on his system...
    When I log in under his user name, left double click doesn't seem to work. If there is a .pdf on the desktop, left double clicking won't open it. In order to get an application to run from finder, I have to right click & select open. When I log in under my user name, everything works great.
    Question: What did he do & how do I un-do it??
    Thanks.
    <Edited by Moderator>

    Try moving:
    Your son's User name > Library > Preferences > com.apple.systempreferences.plist
    to the desktop and restart the computer which will create a new default set. This will reset his system preferences. If this works you can get rid of the file but will have to reset the rest of his preferences. If it doesn't work you can put the file back into the place from which it came (overwrite the new one that will have been created and restart) to restore his settings and we'll have to try something else.
    It also occurred to me that since I don't have a two button mouse and don't know anything about the kind you have, perhaps it has its own preferences settings which might not be affected by the general system ones. I tested the above by changing my mouse settings and checked which of my preferences files had changed.
    Message was edited by: Limnos

  • Problem while displaying the data when double clicked on JTable element

    Hi All,
    i have one List box( JList ) and one table (JTable). Both JTable and JList are positioned on the same Frame. I am able to drag the elements from JList to JTable and also i have added the mouse click action on both List box and JTable.
    if i double click on JList element, that will popup one dialog box.
    if i double click on JTable cell element that was dragged from JList, that will popup same dialog box which was opened earlier for JList action.
    But my problem here is:
    Suppose if i drag the four elements one by one from JList to JTable and (after four elements dragged) double clicked the first element which was dragged first that displayed the popup dialog box structure correctly but the data displayed in that was not correct. It is showing the data of recent dragged element( i.e, fourth element).
    But if i double click on JList element that is showing the correct data according to the double clicked element.
    What might be the problem here, why it was not displaying the correct data when double clicked on JTable element.
    Please help me here.
    Many thanks in advance.
    The following code is used in mouse clicked event method of JList
    private void listMouseClicked(java.awt.event.MouseEvent evt) {                                              
             if(evt.getClickCount()==2){
             AssigningResourcesUI assignResource=new AssigningResourcesUI(this,true);
             assignResource.show();
    }                AND The following code is used in mouse click enevet method of JTable.
    private void tableMouseClicked(java.awt.event.MouseEvent evt) {                                          
            if(evt.getClickCount()==2){
             int row=table.rowAtPoint(new Point(evt.getX(), evt.getY()));
             int col=table.columnAtPoint(new Point(evt.getX(), evt.getY()));
             if(row==-1||col==-1){
                 return;
              Object obj=table.getModel().getValueAt(row, col);
             if(obj==null||(obj.equals(""))){
               }else{
             AssigningResourcesUI assignResource=new AssigningResourcesUI(this,true);
             assignResource.show();
         }            Thanks & Regards,
    Maadhav....
    Edited by: maadhav on Jul 1, 2009 7:22 AM

    I doubt it is related to your problem but:
    int row=table.rowAtPoint(new Point(evt.getX(), evt.getY()));Why are you creating a new Point? Just use evt.getPoint().
    Object obj=table.getModel().getValueAt(row, col);Don't get the data through the model method, get the data through the table method:
    Object obj = table.getValueAt(...)
    This way it will work even if the table happens to be sorted.
    Instead of creating a AssigningResourcesUI object, just disply the value retrieved from the model. That way you know whether the problem is with the mouse event code or your UI class. Like Walter suggested above I"m guess the problem is with your UI class.

  • Double click at a matrix cell

    hello:
       i wanna load a new form from a selected cell in a matrix using the cell double click... but i know how to do it.

    Case SAPbouiCOM.BoEventTypes.et_DOUBLE_CLICK
                        oForm = objMain.objApplication.Forms.Item(FormUID)
                        If pVal.BeforeAction = False Then
                            If pVal.ItemUID = "orad1" And pVal.ColUID = "rte" Then
                                Try
                                    oMatrix = oForm.Items.Item("orad1").Specific
                                    If pVal.Row > 0 Then
                                            Me.LoadForm(FormUID, pVal.Row)
                                        End If
                                    End If
                                Catch ex As Exception
                                    objMain.objApplication.MessageBox(ex.Message)
                                End Try
                            End If
                        End If

  • Overriding double click in JTable custom cell

    I have a JTable where I reset the custom cells to become editable on a single click instead if a double using:
    ((DefaultCellEditor)table.getDefaultEditor(String.class)).setClickCountToStart(1);
    Now what I need to do is display a JPopupMenu click a cell is double clicked. This works on cells that are not editable but the problem is that the user needs the popup dialog to display info for the cells that are editable.
    I have used the basic way to implement a double click on a certain column (in this case my third column):
    public void mouseClicked(MouseEvent e){
                   if (e.getClickCount() == 2 && table.getSelectedColumn() == 2 ){
                        popupMenu.show( e.getComponent(),
    e.getX(), e.getY() );
    But when double clicking, nothing happens.
    Anyone have any idea to implement this or over-ride an editable cell?
    Thanks,
    Chris

    This still says <identifier> expect, how can I resove this please? Then you still have something wrong with your code. Since you didn't post your code how are we supposed to help?
    The proper way to ask a question is to include your demo code that trys to illustrate the problem. Something like the following:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class TableRightClick extends JFrame
         public TableRightClick()
              JTable table = new JTable(10, 5);
              table.addMouseListener( new MouseAdapter()
                   public void mousePressed(MouseEvent e)
                        if ( SwingUtilities.isRightMouseButton(e) )
    //                    if (e.isPopupTrigger())
                             JTable source = (JTable)e.getSource();
                             int row = source.rowAtPoint( e.getPoint() );
                             int column = source.columnAtPoint( e.getPoint() );
                             System.out.println(column);
                             source.changeSelection(row, column, false, false);
              table.setPreferredScrollableViewportSize(table.getPreferredSize());
              getContentPane().add( new JScrollPane(table) );
         public static void main(String[] args)
              TableRightClick frame = new TableRightClick();
              frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
              frame.pack();
              frame.setLocationRelativeTo( null );
              frame.setVisible( true );
    }

  • Previous entered value is lost when double click in the Jtable cell.

    Hi,
    When I double click the cell in the Jtable, the pervious enter data is lost. I unable to mask the double click event also. Could you please help me out.
    Thanks in Advance,
    With Thanks and Regards,
    Shiva

    When I double click the cell in the Jtable, the pervious enter data is lost.No it isn't unless you've customized the code and made an error.
    If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.
    Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.

  • Mouse Double Click on an editable cell of JTable

    Hi Pros:
    Maybe this is an old question but no answser from Forum.
    I have a JTable with adding MouseListener. I tried to put double click behavior on nay row in the table. The problem was that this action can obly work on the uneditable cell and do not work on editable cell.
    Anyone have ideas and help me.
    Thank you!

    Hi Wang,
    I have a problem similar to the one you have some time back.
    I have a query for which I need to use PreparedStatement .The query runs likes this :-
    String str = " Select ? , ename from emp where deptno ? ";
    The values of ? need to be assigned dynamically.
    But I cannot create Prepared Statement from this query .
    If you have got answer to your questions can you inform me at
    [email protected]
    Thanks in advance

  • How? double click to edit a cell in a JTable (Custom Editor/TableModel)

    I have a JTable with a custom table model that when you click anything in the first column a custom editor appears. I would like to know how to make the custom editor appear after a double click on any cell in the first column. It can probably be done with a MouseListener but is there any easier way to do this?
    Thanks.

    this works for me.
    public class MyJcustomEditor extends DefaultCellEditor {
    public MyJcustomEditor(JTextField tField) {
    super(tField);
    setClickCountToStart(2);
    }

  • Needs double click to edit cell in JTable

    I know this is bad design but there's no other way that I could possibly meet the requirement which is to have dynamic components. Anyhow, the requirement is to have any kind of components(e.g. TextFields, Combobox, Regular expression fields, a panel with a number of checkboxes) in a table cell in the same column. It would have been easier to do this by using the the DefaultCellEditor, with the 'panel containing a number of checkboxes' I cannot use it.
    I already have an implementation for this requirement. There was no problem with it when we used Java 1.5. But when we shifted to Java 1.6, I noticed that I need to double-click on a cell so that I can edit it. I did not notice this behavior at all with 1.5. What could have changed in 1.6?
    Below, are my (trimmed-down) codes:
    //TestComponent.java
    public class TestComponent extends JPanel{
    private int componentHeight=16;
    public TestComponent(int i){
    this.setPreferredSize(new Dimension(90, this.componentHeight));
    setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
    switch (i){
    case 0: createTextField(); break;
    case 1: createCheckBox(); break;
    case 2: createCombo(); break;
    private void createTextField(){
    String text = null;
    int textFieldMaxLength = 5;
    JTextField oText = new JTextField(textFieldMaxLength);
    // add it to this Panel:
    this.add(oText);
    // set the data:
    text = "test";
    oText.setText(text);
    // set size for this TextField:
    Dimension fieldSize = new Dimension(
    textFieldMaxLength * 13, this.componentHeight);
              oText.setPreferredSize(fieldSize);
              oText.setMinimumSize(fieldSize);
              oText.setMaximumSize(fieldSize);     
    private void createCheckBox(){
    JCheckBox chkbox = new JCheckBox();
    this.add(chkbox);
    private void createCombo(){
    JComboBox combo = new JComboBox(new String[]{"apple", "orange", "plum", "grapefruit"});
    Dimension fieldSize = new Dimension(                    5 * 13, this.componentHeight);
              combo.setPreferredSize(fieldSize);
              combo.setMinimumSize(fieldSize);
              combo.setMaximumSize(fieldSize);
    this.add(combo);
    //ComponentCellEditor.java
    public class ComponentCellEditor extends AbstractCellEditor
         implements TableCellEditor, Serializable{
    protected JComponent editorComponent = null;     
    public Component getComponent() {
    return editorComponent;
    public Object getCellEditorValue() {
    return editorComponent;
    public boolean isCellEditable(EventObject anEvent) {
    return true;
    public boolean shouldSelectCell(EventObject anEvent) {
    return true;
    public boolean stopCellEditing() {
    fireEditingStopped();
    return true;
    // Implementing the TreeCellEditor Interface
    public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
    this.editorComponent = (TestComponent)value;
    return editorComponent;
    //ComponentCellRenderer.java
    public class ComponentCellRenderer implements TableCellRenderer
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
    TestComponent oComp = (TestComponent) value;
    if (isSelected) {
    oComp.setForeground(table.getSelectionForeground());
    oComp.setBackground(table.getSelectionBackground());
    } else {
    oComp.setForeground(table.getForeground());
    oComp.setBackground(table.getBackground());     
    return oComp;
    //TestTable.java
    public class TestTable
    public static void main(String []args){
    String columns[] = {"Text", "Value"};          
    Class types[] = {String.class, TestComponent.class};
    boolean editable[] = {false, true};
    AsrTable table = new AsrTable(new Dimension(200, 150), columns, types, editable);
    table.addRow(new Object[]{"Field1", new TestComponent(0)});
    table.addRow(new Object[]{"Field2", new TestComponent(1)});
    table.addRow(new Object[]{"Field3", new TestComponent(2)});
    table.setDefaultEditor(TestComponent.class, new ComponentCellEditor());
    table.setDefaultRenderer(TestComponent.class, new ComponentCellRenderer());
    table.setShowGrid(false);
    table.setRowHeight(20);
    table.setRowSelectionAllowed(false);
    JFrame frame = new JFrame();
    frame.addWindowListener( new WindowAdapter() {
         public void windowClosing(WindowEvent e)
         Window win = e.getWindow();
         win.setVisible(false);
         win.dispose();
         System.exit(0);
    JScrollPane pane = new JScrollPane(table);
    frame.getContentPane().add(pane);
    frame.pack();
    frame.setVisible(true);
    }

    My last post doesn't have Code Formatting.
    // TestComponent.java
    public class TestComponent extends JPanel{
         private int componentHeight=16;
         public TestComponent(int i){
              this.setPreferredSize(new Dimension(90, this.componentHeight));
              setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
              switch (i){
                   case 0: createTextField(); break;
                   case 1: createCheckBox(); break;
              case 2: createCombo(); break;
         private void createTextField(){
              String text = null;
              int textFieldMaxLength = 5;
              JTextField oText = new JTextField(textFieldMaxLength);
              // add it to this Panel:
              this.add(oText);
              // set the data:
              text = "test";
              oText.setText(text);
              // set size for this TextField:
              Dimension fieldSize = new Dimension(
                        textFieldMaxLength * 13, this.componentHeight);
              oText.setPreferredSize(fieldSize);
              oText.setMinimumSize(fieldSize);
              oText.setMaximumSize(fieldSize);
         private void createCheckBox(){
              JCheckBox chkbox = new JCheckBox();
              this.add(chkbox);
         private void createCombo(){
              JComboBox combo = new JComboBox(new String[]{"apple", "orange", "plum", "grapefruit"});
              Dimension fieldSize = new Dimension( 5 * 13, this.componentHeight);
              combo.setPreferredSize(fieldSize);
              combo.setMinimumSize(fieldSize);
              combo.setMaximumSize(fieldSize);
              this.add(combo);
    // ComponentCellEditor.java
    public class ComponentCellEditor extends AbstractCellEditor 
         implements TableCellEditor, Serializable
         protected JComponent editorComponent = null;     
         public Component getComponent() {
              return editorComponent;
         public Object getCellEditorValue() {
              return editorComponent;     
         public boolean isCellEditable(EventObject anEvent) {
              return true;
         public boolean shouldSelectCell(EventObject anEvent) {
              return true;
         public boolean stopCellEditing() {
              fireEditingStopped();
              return true;
    //  Implementing the TreeCellEditor Interface
        public Component getTableCellEditorComponent(JTable table, Object value,
              boolean isSelected, int row, int column) {
              this.editorComponent = (TestComponent)value;
              return editorComponent;
    // ComponentCellRenderer.java
    public class ComponentCellRenderer implements TableCellRenderer
         public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row,
                   int column) {
              TestComponent oComp = (TestComponent) value;
              if (isSelected) {
                   oComp.setForeground(table.getSelectionForeground());
                   oComp.setBackground(table.getSelectionBackground());
              } else {
                   oComp.setForeground(table.getForeground());
                   oComp.setBackground(table.getBackground());
              return oComp;
    // TestTable.java
    public class TestTable
         public static void main(String []args){
              String columns[] = {"Text", "Value"};          
              Class types[] = {String.class, TestComponent.class};
              boolean editable[] = {false, true};
              AsrTable table = new AsrTable(new Dimension(200, 150), columns, types, editable);
              table.addRow(new Object[]{"Field1", new TestComponent(0)});
              table.addRow(new Object[]{"Field2", new TestComponent(1)});
              table.addRow(new Object[]{"Field3", new TestComponent(2)});
              table.setDefaultEditor(TestComponent.class, new ComponentCellEditor());
              table.setDefaultRenderer(TestComponent.class, new ComponentCellRenderer());
              table.setShowGrid(false);
              table.setRowHeight(20);
              table.setRowSelectionAllowed(false);
              JFrame frame = new JFrame();
              frame.addWindowListener( new WindowAdapter() {
                   public void windowClosing(WindowEvent e)
                        Window win = e.getWindow();
                        win.setVisible(false);
                        win.dispose();
                        System.exit(0);
              JScrollPane pane = new JScrollPane(table);
              frame.getContentPane().add(pane);
              frame.pack();
              frame.setVisible(true);
    }

  • Must double click JTable cell to edit - Why?

    Hi there,
    I have a custom JTable model, which overrides the isCellEditable method and returns true for the first column. All nice, only that column now gets editable - but why do I have to double click in the cell to be able to edit in it? I've seen swing gui's where the cell gets editable on single click/focus...
    Very thankful for any help in resolving this!
    Best regard,
    AC

    Add a mouselistener to your table and in the mousePressed() method set the editing cell:
    table.editCellAt(row, column);
    table.setEditingRow(row);
    table.setEditingColumn(column);
    table.repaint();

  • JComboBox in JTable to activate when double-click instead of single-click

    I like to know if it is possible to change the default behaviour of JComboBox within the JTable,
    such that instead of single click on the JTable cell for the combo box's popup to appear, I double click on it instead.
    If it is possible please give some advice.
    Thanks.

    I couldn't get to settings because I couldn't scroll and don't know where that is located. I just saw a similar question from someone else. Three clicks on home button worked to turn off voiceover !! Phew!

  • Double click on a JTable row.

    I got and run a sample about double click on a JTable and it works fine. This sample defines a TableModel as shown at the end this note.
    On the other hand, I have an application in which I have defined a JTable
    using the DefaultTableModel as follows :
    DefaultTableModel dtm = new DefaultTableModel(data, names);
    JTable table  = new JTable(dtm);  where data and names are String arrays.
    Of course the mouse listener stuffs have been also specified.
    table.addMouseListener(new MouseAdapter(){
         public void mouseClicked(MouseEvent e){
          if (e.getClickCount() == 2){
             System.out.println(" double click" );
         } );Because the difference with the sample was the table model,
    I changed it with the DefaultTableModel class. At this point, the Double click does not work anymore.
    So I gues it should be an option which prevents double click to work.
    I thought of using mousePress() instead of mouseClick(), but it's very dangerous (I tried). . If by error the user clicks twice (instead of only once) the mousePress method is invoked twice for the same entry
    My question is now simple, may I use double click on a JTable with the default table model. If so, what I have to do ?
    Thanks a lot
    Gege
    TableModel dataModel = new AbstractTableModel() {
         public int getColumnCount() { return names.length; }
         public int getRowCount() { return data.length;}
         public Object getValueAt(int row, int col) {return data[row][col];}
         public String getColumnName(int column) {return names[column];}
         public Class getColumnClass(int col) {return getValueAt(0,col).getClass();}
         public void setValueAt(Object aValue, int row, int column) {
           data[row][column] = aValue;
         };

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.table.*;
    public class ClickIt extends MouseAdapter
        public void mousePressed(MouseEvent e)
            JTable table = (JTable)e.getSource();
            Point p = e.getPoint();
            if(e.getClickCount() == 2)
                System.out.println("table.isEditing = " + table.isEditing());
            int row = table.rowAtPoint(p);
            int col = table.columnAtPoint(p);
            String value = (String)table.getValueAt(row,col);
            System.out.println(value);
        private JTable getLeftTable()
            final String[] names = { "column 1", "column 2", "column 3", "column 4" };
            final Object[][] data = getData("left");
            TableModel dataModel = new AbstractTableModel() {
                public int getColumnCount() { return names.length; }
                public int getRowCount() { return data.length;}
                public Object getValueAt(int row, int col) {return data[row][col];}
                public String getColumnName(int column) {return names[column];}
                public Class getColumnClass(int col) {return getValueAt(0,col).getClass();}
                public void setValueAt(Object aValue, int row, int column) {
                    data[row][column] = aValue;
            JTable table = new JTable(dataModel);
            return configure(table);
        private JTable getRightTable()
            String[] colNames = { "column 1", "column 2", "column 3", "column 4" };
            JTable table = new JTable(new DefaultTableModel(getData("right"), colNames));
            return configure(table);
        private Object[][] getData(String s)
            int rows = 4, cols = 4;
            Object[][] data = new Object[rows][cols];
            for(int row = 0; row < rows; row++)
                for(int col = 0; col < cols; col++)
                    data[row][col] = s + " " + (row*cols + col + 1);
            return data;
        private JTable configure(JTable table)
            table.setColumnSelectionAllowed(true);
            table.setCellSelectionEnabled(true);
            table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
            table.setPreferredScrollableViewportSize(table.getPreferredSize());
            table.addMouseListener(this);
            return table;
        private JPanel getContent()
            JPanel panel = new JPanel(new GridLayout(1,0,0,5));
            panel.add(new JScrollPane(getLeftTable()));
            panel.add(new JScrollPane(getRightTable()));
            return panel;
        public static void main(String[] args)
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.setContentPane(new ClickIt().getContent());
            f.pack();
            f.setVisible(true);
    }

  • JTable: double clicking triggers some action

    Hi there,
    A double click on a row of a JTable makes usually the underlying cell editable. This is the default behaviour of a JTable.
    In my application, the JTable only shows data, without giving users editing rights. Beside that, I'd like that a double click on a row, triggers other actions, like for example copying the selected row to the clipboard or sending it per mail....
    How do I have to configure the JTable for these purposes? Do I have to override the default ListSelectionListener? Did anybody make experiences with that?
    Thanks for your help,
    Best regards,
    edar

    like for example copying the selected row to the clipboardCtrl-C is the default KeyStroke combination for this.
    Beside that, I'd like that a double click on a row, triggers other actions...Then you need to add a MouseListener to the table. Then use:
    rowAtPoint(...);
    columnAtPoint(...);to determine which cell was clicked

  • Listen double clicks on JTable's row

    hi,
    I want to know how to catch double clicks did on a specific JTable's row, or any cell on that.
    I know that's possible because JTable is a JComponent..so, I want to know how to catch the event when the user press Enter over a single selected row, too...
    If you may show me and example or specific links, I'll thank you so much..
    lucky..

    b) The Enter key is used to move the row selection to
    the next row so you need to override the default
    mappings of the table.
    This posting shows how you would do the above on a
    JList. The code should be similiar for a JTable.
    http://forum.java.sun.com/thread.jspa?forumID=57&threa
    dID=626866Thanks anyway...I fix that with a tricky and simplest solution.
    I only put a KeyEventListener on the table and catch the keyEvent, and if it's a EnterKey, then check wich row is selected on table.
    table.addkeyListener(new KeyListener(){
                public void keyPressed(KeyEvent e) {
                    if(e.getKeyCode()==KeyEvent.VK_ENTER){
                        int[] selected_rows = table.getSelectedRows();
                        if(selected_rows.length==1){
                            int row = selected_rows[0];
                            DefaultTableModel table_model = (DefaultTableModel)table.getModel();
                            Object element_at_row = directory_model.getValueAt(row, 1); //I wanna Only the element at column 1
                             //do more things...                      
    //....other interface's methods..
    );

Maybe you are looking for

  • HT4527 i wiped my hard drive and want to put my playlists from my iphone on my computer, ie some of the songs are not in the cloud

    I wiped my hard drive and I want to put my music from my iphone back on my computer, ie some music was not purchased from i tunes

  • Outright USB bus power deterioration?

    2009 MacPro I'm so confounded and tired from this I'll just state the symptoms in bullet fashion • Powered Rosewill hub on one of the 3 rear USB ports: each of the 7 hub ports has been going out one after another the last 2 years. I just pull out a c

  • ADF Component Guide 10.1.3

    Could someone please point me to a ADF component guide (preferably a sample app)? I see one for ADF UIX components but nothing for the 10.1.3 components. I'm looking for a documentation on how to use each of the components in the ADF Core set. I've r

  • When will my MP3 be collected for repair??

    I li've in Ireland. My mp3 had the old headphone jack problem, so i told creative..they said they would collect it cos it was defecti've. When will this happen? I informed creative almost 2 weeks ago.

  • Unreleased vendor list

    Experts, We are on SRM5.0 (Extclassic) We have created vendor list in SRM for different product categories. For one of the product categories, the status of the vendor list is 'Unreleased'. Inspite of this the user is able to create SC for this produ