I have to show a popup menu with the row details when user does not select a row in JTable and right click the mouse. I can detect the right mouse click ny the following code...
But how do I find out the row number on the table. Thanks Sri
You can get the row from Table by calling getRowAt(Point) method.you can get the Point from event.This goes like this.. public void mouseClicked(MouseEvent e){ if(SwingUtilities.isRightMouseButton(e)){ int row= table.getRowAt(e.getPoint()); } }
Sun Certified Java Programmer
That's my roommate. He's kinda weird, but he always pays his half of the rent. And he gave me this tiny ad: