From 736f3251b8ff6abcbb5b27cfdac288524e18004f Mon Sep 17 00:00:00 2001 From: nikomall34 Date: Mon, 4 Dec 2023 02:54:31 +0100 Subject: [PATCH] Width of the first column is fixed now Signed-off-by: nikomall34 --- .../pitmutationmate/visualization/LatestPiTestReport.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pitmutationmate/src/main/kotlin/com/amos/pitmutationmate/pitmutationmate/visualization/LatestPiTestReport.kt b/pitmutationmate/src/main/kotlin/com/amos/pitmutationmate/pitmutationmate/visualization/LatestPiTestReport.kt index 193f1b29..8fae9256 100644 --- a/pitmutationmate/src/main/kotlin/com/amos/pitmutationmate/pitmutationmate/visualization/LatestPiTestReport.kt +++ b/pitmutationmate/src/main/kotlin/com/amos/pitmutationmate/pitmutationmate/visualization/LatestPiTestReport.kt @@ -48,6 +48,13 @@ class LatestPiTestReport : JPanel() { table.intercellSpacing = Dimension(0, 0) table.columnModel.getColumn(0).cellRenderer = CustomProgressBarRenderer() + + val firstColumnWidth = table.tableHeader.getFontMetrics(table.tableHeader.font).stringWidth(" Pit Test Coverage Report ") + 5 + table.columnModel.getColumn(0).maxWidth = firstColumnWidth + table.columnModel.getColumn(0).minWidth = firstColumnWidth + table.columnModel.getColumn(0).preferredWidth = firstColumnWidth + table.columnModel.getColumn(0).width = firstColumnWidth + table.columnModel.getColumn(1).cellRenderer = CustomProgressBarRenderer() layout = BorderLayout()