if (canToolTipFit(currentTip))
if (parent instanceof JPopupMenu) setLightWeightPopupEnabled(((JPopupMenu) parent).isLightWeightPopupEnabled()); else setLightWeightPopupEnabled(true);  if (isLightWeightPopupEnabled())
  void showTip()  {    if (! enabled || currentComponent == null)      return;    if (currentTip == null        || currentTip.getComponent() != currentComponent        && currentComponent instanceof JComponent)      currentTip = ((JComponent) currentComponent).createToolTip();    Point p = currentPoint;    Dimension dims = currentTip.getPreferredSize();    if (canToolTipFit(currentTip))      {	JLayeredPane pane = ((JRootPane) SwingUtilities.getAncestorOfClass(JRootPane.class,	                                                                   currentComponent))	                    .getLayeredPane();	// This should never happen, but just in case.	if (pane == null)	  return;	if (containerPanel != null)	  hideTip();	if (isLightWeightPopupEnabled())	  {	    containerPanel = new Panel();	    JRootPane root = new JRootPane();	    root.getContentPane().add(currentTip);	    containerPanel.add(root);	  }	else	  {	    containerPanel = new JPanel();	    containerPanel.add(currentTip);	  }	LayoutManager lm = containerPanel.getLayout();	if (lm instanceof FlowLayout)	  {	    FlowLayout fm = (FlowLayout) lm;	    fm.setVgap(0);	    fm.setHgap(0);	  }	p = getGoodPoint(p, pane, currentTip, dims);	pane.add(containerPanel);	containerPanel.setBounds(p.x, p.y, dims.width, dims.height);	currentTip.setBounds(0, 0, dims.width, dims.height);	pane.revalidate();	pane.repaint();      }    else      {	SwingUtilities.convertPointToScreen(p, currentComponent);	tooltipWindow = new JWindow();	tooltipWindow.getContentPane().add(currentTip);	tooltipWindow.setFocusable(false);	tooltipWindow.pack();	tooltipWindow.setBounds(p.x, p.y, dims.width, dims.height);	tooltipWindow.show();      }    currentTip.setVisible(true);  }