List of usage examples for javax.swing JTable getLocationOnScreen
public Point getLocationOnScreen()
From source file:MainClass.java
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { if (value == null) { return this; }//w w w. j a va2s. co m if (value instanceof Volume) { setValue(((Volume) value).getVolume()); } else { setValue(0); } table.setRowSelectionInterval(row, row); table.setColumnSelectionInterval(column, column); originalValue = getValue(); editing = true; Point p = table.getLocationOnScreen(); Rectangle r = table.getCellRect(row, column, true); helper.setLocation(r.x + p.x + getWidth() - 50, r.y + p.y + getHeight()); helper.setVisible(true); return this; }