if (showingResizeCursor && e.getSource() != frame)
if (showingCursor != Cursor.DEFAULT_CURSOR && e.getSource() != frame)
    public void mouseMoved(MouseEvent e)    {      // Turn off the resize cursor if we are in the frame header.      if (showingResizeCursor && e.getSource() != frame)        {          frame.setCursor(Cursor.getDefaultCursor());          showingResizeCursor = false;        }      else if (e.getSource()==frame && frame.isResizable())        {          int cursor;          switch (sectionOfClick(e.getX(), e.getY()))            {            case NORTH:              cursor = Cursor.N_RESIZE_CURSOR;              break;            case NORTH_EAST:              cursor = Cursor.NE_RESIZE_CURSOR;              break;            case EAST:              cursor = Cursor.E_RESIZE_CURSOR;              break;            case SOUTH_EAST:              cursor = Cursor.SE_RESIZE_CURSOR;              break;            case SOUTH:              cursor = Cursor.S_RESIZE_CURSOR;              break;            case SOUTH_WEST:              cursor = Cursor.SW_RESIZE_CURSOR;              break;            case WEST:              cursor = Cursor.W_RESIZE_CURSOR;              break;            case NORTH_WEST:              cursor = Cursor.NW_RESIZE_CURSOR;              break;            default:              cursor = Cursor.DEFAULT_CURSOR;            }          Cursor resize = Cursor.getPredefinedCursor(cursor);          frame.setCursor(resize);          showingResizeCursor = true;        }    }