From 079812dd97e3d403e476615021d94b84e88964fe Mon Sep 17 00:00:00 2001 From: adrian Date: Thu, 11 Sep 2014 21:40:59 +0200 Subject: [PATCH] Fix: Transactions sometimes doesn't appear until resize window --- .../src/main/java/org/ethereum/gui/BlockChainTable.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ethereumj-studio/src/main/java/org/ethereum/gui/BlockChainTable.java b/ethereumj-studio/src/main/java/org/ethereum/gui/BlockChainTable.java index 3a8d4922..390238b3 100644 --- a/ethereumj-studio/src/main/java/org/ethereum/gui/BlockChainTable.java +++ b/ethereumj-studio/src/main/java/org/ethereum/gui/BlockChainTable.java @@ -127,7 +127,9 @@ public class BlockChainTable extends JFrame implements ActionListener { createBlockPanel(); transactionsPanel = new JPanel(new GridBagLayout()); - transactionsPanel.setMaximumSize(new Dimension(Short.MAX_VALUE, 160)); + scrollPane = new JScrollPane(transactionsPanel); + scrollPane.setBorder(BorderFactory.createEmptyBorder()); + scrollPane.setAlignmentX(0); fillBlock(this); titlePanel.setAlignmentX(0); @@ -140,10 +142,6 @@ public class BlockChainTable extends JFrame implements ActionListener { transactionsLabel.setAlignmentX(0); transactionsLabel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0)); topPanel.add(transactionsLabel); - - scrollPane = new JScrollPane(transactionsPanel); - scrollPane.setBorder(BorderFactory.createEmptyBorder()); - scrollPane.setAlignmentX(0); topPanel.add(scrollPane); topPanel.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_C, KeyEvent.CTRL_DOWN_MASK), "Copy"); @@ -684,6 +682,7 @@ public class BlockChainTable extends JFrame implements ActionListener { row++; } transactionsPanel.repaint(); + scrollPane.revalidate(); } private JPanel createTransactionPanel(final BlockChainTable blockchainTable, final Transaction transaction) {