SwingUtilities.convertPointToScreen(origin, toolBar);
if (toolBar.isShowing()) SwingUtilities.convertPointToScreen(origin, toolBar);
    public void mousePressed(MouseEvent e)    {      if (! toolBar.isFloatable())	return;      Point ssd = e.getPoint();      Insets insets = toolBar.getInsets();      // Verify that this click occurs in the top inset.      if (toolBar.getOrientation() == SwingConstants.HORIZONTAL)        {	  if (e.getX() > insets.left)	    return;    }      else        {	  if (e.getY() > insets.top)	    return;        }      origin = new Point(0, 0);      SwingUtilities.convertPointToScreen(ssd, toolBar);      if (! (SwingUtilities.getAncestorOfClass(Window.class, toolBar) instanceof UIResource))	// Need to know who keeps the toolBar if it gets dragged back into it.	origParent = toolBar.getParent();      SwingUtilities.convertPointToScreen(origin, toolBar);      isDragging = true;      if (dragWindow != null)	dragWindow.setOffset(new Point(e.getX(), e.getY()));      dragTo(e.getPoint(), origin);    }