public static boolean pointOutsidePrefSize(JTable table,int row,int column,Point p){
  if (table.convertColumnIndexToModel(column) != 0 || row == -1) {
    return true;
  }
  TableCellRenderer tcr=table.getCellRenderer(row,column);
  Object value=table.getValueAt(row,column);
  Component cell=tcr.getTableCellRendererComponent(table,value,false,false,row,column);
  Dimension itemSize=cell.getPreferredSize();
  Rectangle cellBounds=table.getCellRect(row,column,false);
  cellBounds.width=itemSize.width;
  cellBounds.height=itemSize.height;
  assert (p.x >= cellBounds.x && p.y >= cellBounds.y);
  return p.x > cellBounds.x + cellBounds.width || p.y > cellBounds.y + cellBounds.height;
}

public static boolean pointOutsidePrefSize ( JTable table , int row , int column , Point p ) { if ( table . convertColumnIndexToModel ( column ) != 0 || row == - 1 ) { return true ; } TableCellRenderer tcr = table . getCellRenderer ( row , column ) ; Object value = table . getValueAt ( row , column ) ; Component cell = tcr . getTableCellRendererComponent ( table , value , false , false , row , column ) ; Dimension itemSize = cell . getPreferredSize ( ) ; Rectangle cellBounds = table . getCellRect ( row , column , false ) ; cellBounds . width = itemSize . width ; cellBounds . height = itemSize . height ; assert ( p . x >= cellBounds . x && p . y >= cellBounds . y ) ; return p . x > cellBounds . x + cellBounds . width || p . y > cellBounds . y + cellBounds . height ; }
returns true if the given point is outside the preferredsize of the item at the given row of the table . ( column must be 0 ) . does not check the " table . isfilelist " property . that should be checked before calling this method . this is used to make windowsl & f jfilechooser act like native dialogs .
