Skip to content

Instantly share code, notes, and snippets.

TableColumn exerciseCol = new TableColumn("Exercise");
exerciseCol.setMinWidth(150);
exerciseCol.setCellValueFactory(new PropertyValueFactory<RecordModel, String>("exercise"));
exerciseCol.setSortType(TableColumn.SortType.DESCENDING);
TableColumn weightCol = new TableColumn("Weight (kg)");
weightCol.setMinWidth(150);
weightCol.setCellValueFactory(new PropertyValueFactory<RecordModel, Double>("weight"));
TableColumn dateCol = new TableColumn("Date");
dateCol.setMinWidth(150);
dateCol.setCellValueFactory(new PropertyValueFactory<RecordModel, LocalDate>("date"));
CREATE TABLE news (
newsId INT NOT NULL AUTO_INCREMENT,,
newsPic BLOB,
newsTitle VARCHAR(255) DEFAULT NULL,
newsText TEXT,
PRIMARY KEY (newsId)
)