public int setPage(int page) {
		if (select == null) {
			return -1;
		}
		int nbpage = getPageCount();
		if (nbpage > 0) {
			if (page > 0 && page < getPageCount()) {
				currentPage = page - 1;
				currentRows = getNbRow();
				select.limit = currentRows;
				select.offset = currentPage * rowperpage;
				try {
					this.curRows = this.database.getRows(select);
					currentRows = this.curRows.size();
				} catch (WaarpDatabaseSqlException e) {
					this.curRows = null;
				}
				fireTableStructureChanged();
			}
		} else {
			if (page > 0) {
				select.limit = currentRows;
				select.offset = (page-1) * rowperpage;
				List<String[]> temp = null;
				try {
					temp = this.database.getRows(select);
				} catch (WaarpDatabaseSqlException e) {
				}
				if (temp == null || temp.size() == 0) {
					select.limit = currentRows;
					select.offset = currentPage * rowperpage;
				} else {
					currentPage = page - 1;
					currentRows = temp.size();
					this.curRows = temp;
				}
				fireTableStructureChanged();
			}
		}
		return currentPage + 1;
	}