private TableDataModel createTableModel() {
		return new AbstractTableDataModel() {
			/**
			 * Column id for the first name column.
			 */
			private static final int FIRST_NAME = 0;

			/**
			 * Column id for the last name column.
			 */
			private static final int LAST_NAME = 1;

			/**
			 * Column id for the date of birth column.
			 */
			private static final int DOB = 2;

			/**
			 * Column id for the action column.
			 */
			private static final int BUTTON = 3;

			private final List<Person> data
					= Arrays.asList(new Person[]{new Person(123, "Joe", "Bloggs",
				parse("01/02/1973")),
				new Person(456, "Jane", "Bloggs", parse("04/05/1976")),
				new Person(789, "Kid", "Bloggs", parse("31/12/1999"))});

			/**
			 * {@inheritDoc}
			 */
			@Override
			public Object getValueAt(final int row, final int col) {
				Person person = data.get(row);

				switch (col) {
					case FIRST_NAME:
						return person.getFirstName();

					case LAST_NAME:
						return person.getLastName();

					case DOB: {
						if (person.getDateOfBirth() == null) {
							return null;
						}

						return person.getDateOfBirth();
					}

					case BUTTON: {
						return person;
					}

					default:
						return null;
				}
			}

			/**
			 * {@inheritDoc}
			 */
			@Override
			public int getRowCount() {
				return data.size();
			}
		};
	}
private TableDataModel createTableModel ( ) { return new AbstractTableDataModel ( ) { private static final int FIRST_NAME = 0 ; private static final int LAST_NAME = 1 ; private static final int DOB = 2 ; private static final int BUTTON = 3 ; private final List < Person > data = Arrays . asList ( new Person [ ] { new Person ( 123 , "Joe" , "Bloggs" , parse ( "01/02/1973" ) ) , new Person ( 456 , "Jane" , "Bloggs" , parse ( "04/05/1976" ) ) , new Person ( 789 , "Kid" , "Bloggs" , parse ( "31/12/1999" ) ) } ) ; @ Override public Object getValueAt ( final int row , final int col ) { Person person = data . get ( row ) ; switch ( col ) { case FIRST_NAME : return person . getFirstName ( ) ; case LAST_NAME : return person . getLastName ( ) ; case DOB : { if ( person . getDateOfBirth ( ) == null ) { return null ; } return person . getDateOfBirth ( ) ; } case BUTTON : { return person ; } default : return null ; } } @ Override public int getRowCount ( ) { return data . size ( ) ; } } ; }
Creates a table data model containing some dummy person data.

@return a new data model.