protected Rectangle getBoundsForIconOf(JInternalFrame frame) { return null;
protected Rectangle getBoundsForIconOf(JInternalFrame frame) {      JDesktopPane desktopPane = frame.getDesktopPane(); Rectangle paneBounds = desktopPane.getBounds(); Insets insets = desktopPane.getInsets(); Dimension pref = frame.getDesktopIcon().getPreferredSize();  if (desktopPane == null) return frame.getDesktopIcon().getBounds();  Component[] frames = desktopPane.getComponents();  int count = 0; for (int i = 0, j = 0; i < frames.length; i++) if (frames[i] instanceof JDesktopIcon || frames[i] instanceof JInternalFrame && ((JInternalFrame) frames[i]).getWasIcon() && frames[i] != frame) count++; iconRects = new Rectangle[count]; for (int i = 0, j = 0; i < frames.length; i++) if (frames[i] instanceof JDesktopIcon) iconRects[--count] = frames[i].getBounds(); else if (frames[i] instanceof JInternalFrame && ((JInternalFrame) frames[i]).getWasIcon() && frames[i] != frame) iconRects[--count] = ((JInternalFrame) frames[i]).getDesktopIcon() .getBounds();  int startingX = insets.left; int startingY = paneBounds.height - insets.bottom - pref.height; Rectangle ideal = new Rectangle(startingX, startingY, pref.width, pref.height); boolean clear = true;  while (iconRects.length > 0) { clear = true; for (int i = 0; i < iconRects.length; i++) { if (iconRects[i] != null && iconRects[i].intersects(ideal)) { clear = false; break; } } if (clear) return ideal;  startingX += pref.width; if (startingX + pref.width > paneBounds.width - insets.right) { startingX = insets.left; startingY -= pref.height; } ideal.setBounds(startingX, startingY, pref.width, pref.height); }  return ideal;
	protected Rectangle getBoundsForIconOf(JInternalFrame frame) {		return null; // TODO	} // getBoundsForIconOf()