From 630cdea1d9383aee75a984867682459d06c7c61a Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 11 Jun 2011 02:19:23 +0200 Subject: Make game offers, withdrawals (untested) and requests work git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@408 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/view/impl/GameListPanel.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/jrummikub/view') diff --git a/src/jrummikub/view/impl/GameListPanel.java b/src/jrummikub/view/impl/GameListPanel.java index eae424a..dae0f27 100644 --- a/src/jrummikub/view/impl/GameListPanel.java +++ b/src/jrummikub/view/impl/GameListPanel.java @@ -4,7 +4,6 @@ import java.awt.Color; import java.awt.Component; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; -import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; @@ -163,16 +162,24 @@ class GameListPanel extends JPanel implements IGameListPanel { JLabel hostLabel, playerCountLabel; GameDataCellRenderer() { - setLayout(new GridLayout(1, 2)); + setLayout(new GridBagLayout()); + GridBagConstraints c = new GridBagConstraints(); + c.fill = GridBagConstraints.BOTH; + c.gridwidth = 1; + c.weightx = 1; + c.weighty = 1; + hostLabel = new JLabel(); hostLabel.setOpaque(true); hostLabel.setHorizontalAlignment(JLabel.LEFT); - add(hostLabel); + add(hostLabel, c); playerCountLabel = new JLabel(); playerCountLabel.setOpaque(true); playerCountLabel.setHorizontalAlignment(JLabel.RIGHT); - add(playerCountLabel); + + c.gridwidth = GridBagConstraints.REMAINDER; + add(playerCountLabel, c); } @Override -- cgit v1.2.3