MaterialFX
MaterialFX copied to clipboard
MFXPaginatedTableView show additional space aftear last column
Describe the bug FXML
<VBox id="addressText" alignment="CENTER" spacing="5.0" styleClass="content" stylesheets="@../css/easywallet.css" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ste.w3.easywallet.ui.LedgerController">
<padding>
<Insets bottom="15.0" />
</padding>
<children>
<MFXPaginatedTableView fx:id="transactions" rowsPerPage="10" />
</children>
</VBox>
In the controller I am addign the columns as:
MFXTableColumn<Transaction> whenColumn = new MFXTableColumn<>("when", false, Comparator.comparing(Transaction::getWhen));
MFXTableColumn<Transaction> amountColumn = new MFXTableColumn<>("amount", false, Comparator.comparing(Transaction::getAmount));
MFXTableColumn<Transaction> fromColumn = new MFXTableColumn<>("from", false, Comparator.comparing(Transaction::getFrom));
whenColumn.setRowCellFactory(transaction -> new MFXTableRowCell<>(Transaction::getWhen));
amountColumn.setRowCellFactory(transaction -> new MFXTableRowCell<>(Transaction::getAmount));
fromColumn.setRowCellFactory(transaction -> new MFXTableRowCell<>(Transaction::getFrom));
transactions.getTableColumns().addAll(whenColumn, amountColumn, fromColumn);
transactions.getFilters().addAll(
new StringFilter<>("when", Transaction::getWhen),
new StringFilter<>("amount", Transaction::getAmount),
new StringFilter<>("from", Transaction::getFrom)
);
When I show the table, which should resize all columns, not all space is used:
MRE(Minimal Reproducible Example) It is noticeable in the demo application as well.
To Reproduce Run the demo application and see the Tables section
Expected behavior Columns are sized to expand to the available space
Screenshots