From e762bc43f1e445c6309999775cd377cb57e57ed8 Mon Sep 17 00:00:00 2001 From: esoe Date: Mon, 16 May 2022 20:57:14 +0300 Subject: [PATCH 1/2] =?UTF-8?q?=D0=B9=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/ru/egspt/ReportPane.java | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/main/java/ru/egspt/ReportPane.java b/src/main/java/ru/egspt/ReportPane.java index 4206e1c..442bc0e 100644 --- a/src/main/java/ru/egspt/ReportPane.java +++ b/src/main/java/ru/egspt/ReportPane.java @@ -2,6 +2,7 @@ package ru.egspt; import java.awt.Dimension; import java.awt.Color; +import java.awt.BorderLayout; import javax.swing.JButton; import javax.swing.JPanel; @@ -21,17 +22,27 @@ public class ReportPane extends JPanel{ public ReportPane(App app){ tableModel = new ReportTableModel(app.getData()); table = new JTable(tableModel); - table.setPreferredScrollableViewportSize(new Dimension(500, 70)); - table.setFillsViewportHeight(true); + //table.setTableHeader(tableModel.getHeader()); + //table.setPreferredScrollableViewportSize(new Dimension(500, 70)); + //table.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); + //table.setAutoResizeMode(JTable.HEIGHT); + //table.setPreferredScrollableViewportSize(table.getPreferredSize()); + //table.setFillsViewportHeight(true); + //table.getMaximumSize(); + //table.setFillsViewportHeight(true); JScrollPane scrollPane = new JScrollPane(table, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); + //scrollPane.getMaximumSize(); tabPane.add(scrollPane); + } public void init(){ controlPane.add(generateXLSXButton); controlPane.add(generateTXTButton); - this.add(controlPane); - this.add(tabPane); + this.setLayout(new BorderLayout()); + this.add(controlPane, BorderLayout.NORTH); + this.add(tabPane, BorderLayout.CENTER); + tabPane.getMaximumSize(); TitledBorder border = new TitledBorder(new LineBorder(Color.black), "report", TitledBorder.CENTER, TitledBorder.CENTER); this.setBorder(border); this.setVisible(true); From 91504400416fff67570505563d20d5c3a3418cbe Mon Sep 17 00:00:00 2001 From: esoe Date: Mon, 16 May 2022 21:43:33 +0300 Subject: [PATCH 2/2] qqq --- src/main/java/ru/egspt/App.java | 2 ++ target/classes/ru/egspt/App.class | Bin 2606 -> 2606 bytes target/classes/ru/egspt/ReportPane.class | Bin 2326 -> 2378 bytes 3 files changed, 2 insertions(+) diff --git a/src/main/java/ru/egspt/App.java b/src/main/java/ru/egspt/App.java index 353af4a..3e01ed6 100644 --- a/src/main/java/ru/egspt/App.java +++ b/src/main/java/ru/egspt/App.java @@ -29,6 +29,8 @@ public class App extends JPanel{ mainframe.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); mainframe.add(this); mainframe.setSize(640, 480); + //mainframe.setLocationByPlatform(true); + //mainframe.pack(); mainframe.setVisible(true); } /** diff --git a/target/classes/ru/egspt/App.class b/target/classes/ru/egspt/App.class index 8d92cca15f63bc16ecb0f5ff81d8403e09fa9b92..77627917cdb7ad95d79050a8820566a4edb8b5eb 100644 GIT binary patch delta 91 zcmZ1{vQA`!76+>mg9?N4WPJ`dMvciII7BCRbEq@wfmtVjEE6EhhS3Vlcj8oMbO5vJ ifh@Pl%Q*uCy%;zcycq--d>BL+d>JGd{3mm8sR00f^%lwi delta 91 zcmZ1{vQA`!76+>Wg9?M3k9PRo=RKLijo*pgF^9zEg(p-sK87a%fNI7r^Bm0>T}_G z68?iLgE6hKiE-tEg>mB#@DI3kXFM~5pvJ|$IrrS}`_6aH*$iw4`0bzXKLF^%i!J_R zReRH-xGJtk^J|KhjSf#_3|&>nL`~+=j{yO77_?qiw|a*JT*M{ob#q9$f#BNk58;sygZq8sLd zO;6d?rWnG1P~v)SS=VGOZN^+3RV2rw(xRL(9fdT5H!f?YZ1AYYEdjT2hhcwKHk0DI zl3U45CVEwAWWtOm1IucwoVR?5>}%s{TeJh68j$8}XV1l&cIj7qAQ zSz_?-2|3>}9&=F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