Click « JTable « Java Swing Q&A





1. Change the Ctrl + click behaviour on a JTable    stackoverflow.com

Is there an easy way to manipulate the controls on a JTable to give different functionality when there is a keyboard button pressed (ie. CTRL button) and a row is selected? ...

2. creating a clickable table    stackoverflow.com

I want to create a table where I can click the numbers (1.1, 1.2 etc) under the display tab so that another window will pop up showing the cell details. How ...

3. swing JTable: tweak "enter" so it acts the same as double-clicking a row    stackoverflow.com

I'm having a brain cramp -- how do I set up a JTable so that the enter key acts the same as double-clicking a row? The "nice" brute force way is to ...

4. How do I make the main window to react to a table click    stackoverflow.com

I am a new user of Java swing. I need to be able to create a popup with row info when the user clicks on that row. ...

5. JTable Right-Click popupmenu in Netbeans    stackoverflow.com

I want to add a right click popupmenu to a JTable in NetBeans IDE (seems like a simple task... lol) I got it to partly work by 1) adding a popupmenu to the ...

6. Click hyperlink in jtable?    stackoverflow.com

How do i enable hyperlink for every record in the jtable? What i want to do is such that user can click on the hyperlink which will then display the information ...

7. Enter value in JTable cell and click OK does not register value    stackoverflow.com

I have a JTable which has certain cells editable. If the user enters in a value into an editable cell and then clicks the OK button on my form, the ...

8. How to get cell value of jtable depending on which row is clicked    stackoverflow.com

I am trying to use an update method on my jtable that's connected to the database and would like to fill in the textfields on the form depending on which row ...

9. How can I make a JTable cell do different things on single-click than on double-click?    stackoverflow.com

I am using an editable JTable that contains a column named Subject. When the first row is empty and the user clicks on a subject cell to add new task, by ...





10. How to delete row by double-clicking?    stackoverflow.com

I'm new to java, so my knowledge is quite limited. I already want to excuse now, if I have overlooked some rather obvious solution. I'm having a problem trying to make a ...

11. How can double-clicking be disabled for just one portion of a JTable?    stackoverflow.com

I have a JTable with row selection enabled. Before today, my desired functionality was for double-clicking on any given row to open up a new window. And before today, that worked ...

12. java.awt.IllegalComponentStateException when I click on JComboBox in JTable problem    stackoverflow.com

I have strange problem. I have class which behaves similar dropdown list.

package test.view;

    import java.awt.Color;
    import java.awt.Component;
    import java.awt.event.FocusAdapter;
    ...

13. sort JTable's entries without clicking on column header    stackoverflow.com

I've implemented row sorting on a JTable both using DefaultRowSorter and my custom defined row sorter class. All works fine clicking on the column header to sort the table. But what about ...

14. Click event on jTable -Java    stackoverflow.com

I have created a table in java in Netbeans and filled it with some data. Now I want to show some detail in a text area corresponding to the particular column ...

15. Disable right click menu in swing spinner component    stackoverflow.com

I have a spinner running in JTable and when a user right clicks on it a menu popups with copy, cut, paste choices. My questions is, how can I disable this ...

16. Behavior of cells in Jtable (right click inside of a cell)    stackoverflow.com

I have a JTable and I want to open a PopupMenu by a right-click inside a cell. I tried this by making my own AbstractCellEditor, but it doesn't work (When I ...





17. Retrieve JTable row clicked when a componentPopupMenu is displayed    forums.netbeans.org

I'm new to NetBeans and basically a newb at Swing so I apologize in advance if this is a dumb question. I have a JTable that I would like to right ...

18. How do I catch double click on JTable?    coderanch.com

19. JTable click sometimes ignored    coderanch.com

20. Doble clicking a cell in JTable    coderanch.com

21. JTable Double click    coderanch.com

23. Detecting double clicks in a JTable    coderanch.com

24. Why change to a cell is not activated until i click somewhere else?    coderanch.com

Hi SoonAnn, I have had problems with this in the past. I think it is just the way the JTable was designed because the table doesn't change the model data until the user has specified completion either through lostFocus or enter key. You can programmatically move the editing cell to some other cell and then back again. Visually nothing changes and ...

26. Table cells value changing on double click    coderanch.com

I have asked this question before. What I have is a class that I have written that hold some data. I place objects of this class in the first column of each row so when I double click on a row I have easy access to a particular piece of info about that row. However, when I double click on the ...

27. Popup menu not showing when JTable cell clicked    coderanch.com

private class TableMouseSelect extends MouseAdapter { public void mouseReleased(MouseEvent evt) { if(evt.getSource() == table) { selectTableRow(evt,table); } } public void mousePressed(MouseEvent evt) { if(evt.getSource() == table) { selectTableRow(evt,table); } } // If mouse was double-clicked, run method to populate tables with data. public void mouseClicked(MouseEvent evt) { if(evt.getSource() == table) { selectTableRow(evt,table); if(evt.getClickCount() > 1) { int selRow = table.getSelectedRow(); } ...

28. Double Click on the JTable Cells    coderanch.com

31. JTable responding to row clicks    coderanch.com

Is this a situation where it's possible for the user to double click a row without selecting that row? What I'm getting at is that if you're guaranteed to have the row selected for the frame you want opened at thetime of the click then you can do this: public void mouseClicked(MouseEvent e) { if (e.getClickCount == 2) { int selRow ...

32. Getting index of a clicked column?? (wierd prob)    coderanch.com

Hi, Ive been having a problem return the index of the seleted column in a jtable. Ive tried a few things, including reading sun's doco on jtables but have not been able to solve the following bug. If i click on a column, on its left side,..i get the correct column index. If i click on the same column, on its ...

33. Sort by click the JTable column head.    coderanch.com

34. Column Click    coderanch.com

35. JTable header click event ?    coderanch.com

36. Intializing Cell Renderers on click spans multiple action    coderanch.com

Hi, I have CellRenderers implemented for sorting Jtable columns.. In my panel.. i have a clear button which will clear table contents and should also clear the cell renderers on the columns already present.. On click of clear button i tried to initialise the CellRenderers again on the colums... But on clicking the column headers for sorting.. the column listeners are ...

37. JTables and double click events?    coderanch.com

38. jtable would like to handle both single click and double click    coderanch.com

I have a jtable where i'd like the followiung to occur: single click: do one thing double click: do an other Problem is if i double click it executing both the single then double. Since both have tasks that read same file im getting major issues. Why would this be happening anyfixes? i tried using double click on one and mouse ...

39. jtable: column header click    coderanch.com

hi i have a jtable, it have some header column with check box when i click on the first column header, it check and the second come checked two i don't have any idea to resolve that any idea? thanks import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.table.*; public class MainPanel extends JPanel { public MainPanel() { super(new BorderLayout()); String[] columnNames ...

40. clicking on a JTable holding resultSet    dbforums.com

hi there, i am a bit new to JDBC and swing, i have previously only used Java for cryptography...here is my question i have placed a resultSet into a Jtable by converting the rs to an object array and populating the table, i would like to be able to click on the table and bring up the record clicked, my idea ...

41. Double click eevent on particular row    java-forums.org

42. right clicking JTable row    java-forums.org

43. the jtable cell and column head size increased on each click    forums.oracle.com

Swing related questions should be posted in the Swing forum. I have never seen this behaviour. 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 ...

44. Issue when clicking checkbox inside JTable    forums.oracle.com