An object for a table in java