From 2b381670878ff8e11fcb5b06cba4948f74b18494 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 30 May 2011 15:35:11 +0200 Subject: ScorePanel: Make round number column less wide git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@321 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/view/impl/ScorePanel.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/jrummikub/view/impl/ScorePanel.java b/src/jrummikub/view/impl/ScorePanel.java index 5610368..8947d17 100644 --- a/src/jrummikub/view/impl/ScorePanel.java +++ b/src/jrummikub/view/impl/ScorePanel.java @@ -91,7 +91,7 @@ class ScorePanel extends JPanel implements IScorePanel { private void addPlayerNames() { GridBagConstraints c = new GridBagConstraints(); c.fill = GridBagConstraints.BOTH; - c.weightx = 1.0; + c.weightx = 0.3; c.weighty = 0.0; c.insets = new Insets(0, 7, 0, 7); @@ -99,6 +99,8 @@ class ScorePanel extends JPanel implements IScorePanel { roundHead.setHorizontalAlignment(JLabel.CENTER); innerPanel.add(roundHead, c); + c.weightx = 1.0; + for (Iterator it = players.iterator(); it.hasNext();) { PlayerSettings player = it.next(); @@ -118,7 +120,7 @@ class ScorePanel extends JPanel implements IScorePanel { private void addScoreRow(Score score, int n) { GridBagConstraints c = new GridBagConstraints(); c.fill = GridBagConstraints.BOTH; - c.weightx = 1.0; + c.weightx = 0.3; c.weighty = 0.0; c.gridwidth = 1; c.insets = new Insets(0, 7, 0, 7); @@ -127,6 +129,8 @@ class ScorePanel extends JPanel implements IScorePanel { roundLabel.setHorizontalAlignment(JLabel.CENTER); innerPanel.add(roundLabel, c); + c.weightx = 1.0; + for (int i = 0; i < score.getPoints().size(); ++i) { if (i == score.getPoints().size() - 1) { c.gridwidth = GridBagConstraints.REMAINDER; @@ -141,7 +145,7 @@ class ScorePanel extends JPanel implements IScorePanel { private void addAccumulatedScore() { GridBagConstraints c = new GridBagConstraints(); c.fill = GridBagConstraints.BOTH; - c.weightx = 1.0; + c.weightx = 0.3; c.weighty = 0.0; c.insets = new Insets(0, 7, 0, 7); @@ -149,6 +153,8 @@ class ScorePanel extends JPanel implements IScorePanel { accumLabel.setHorizontalAlignment(JLabel.CENTER); innerPanel.add(accumLabel, c); + c.weightx = 1.0; + for (int i = 0; i < accumulatedScore.getPoints().size(); ++i) { if (i == accumulatedScore.getPoints().size() - 1) { c.gridwidth = GridBagConstraints.REMAINDER; -- cgit v1.2.3