summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/view/impl/GameListPanel.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jrummikub/view/impl/GameListPanel.java')
-rw-r--r--src/jrummikub/view/impl/GameListPanel.java15
1 files changed, 11 insertions, 4 deletions
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