From b4c2359b0b0faee933b91c83c31f2e5b4e6b7933 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 3 May 2011 14:29:58 +0200 Subject: Fix PlayerPanel for Metal L&F git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@73 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/view/impl/PlayerPanel.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/jrummikub/view') diff --git a/src/jrummikub/view/impl/PlayerPanel.java b/src/jrummikub/view/impl/PlayerPanel.java index 309982e..4edd511 100644 --- a/src/jrummikub/view/impl/PlayerPanel.java +++ b/src/jrummikub/view/impl/PlayerPanel.java @@ -81,7 +81,6 @@ class PlayerPanel extends JPanel implements IPlayerPanel { private void createLeftPanel() { leftPanel = new JPanel(); leftPanel.setLayout(null); - leftPanel.setOpaque(false); leftPanel.setBorder(new EmptyBorder(SIDE_PANEL_INSET, SIDE_PANEL_INSET, SIDE_PANEL_INSET, SIDE_PANEL_INSET)); @@ -93,6 +92,8 @@ class PlayerPanel extends JPanel implements IPlayerPanel { leftPanel.add(currentPlayerNameLabel); sortByNumberButton = new JButton("
Sort by number"); + sortByNumberButton.setFont(sortByNumberButton.getFont().deriveFont(0)); + sortByNumberButton.setMargin(new Insets(0, 0, 0, 0)); sortByNumberButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { @@ -102,6 +103,8 @@ class PlayerPanel extends JPanel implements IPlayerPanel { leftPanel.add(sortByNumberButton); sortByColorButton = new JButton("
Sort by color"); + sortByColorButton.setFont(sortByColorButton.getFont().deriveFont(0)); + sortByNumberButton.setMargin(new Insets(0, 0, 0, 0)); sortByColorButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { @@ -116,7 +119,6 @@ class PlayerPanel extends JPanel implements IPlayerPanel { private void createRightPanel() { rightPanel = new JPanel(); rightPanel.setLayout(null); - rightPanel.setOpaque(false); rightPanel.setBorder(new EmptyBorder(SIDE_PANEL_INSET, SIDE_PANEL_INSET, SIDE_PANEL_INSET, SIDE_PANEL_INSET)); @@ -125,6 +127,8 @@ class PlayerPanel extends JPanel implements IPlayerPanel { rightPanel.add(timeBar); endTurnButton = new JButton("End turn"); + endTurnButton.setFont(endTurnButton.getFont().deriveFont(0)); + endTurnButton.setMargin(new Insets(0, 0, 0, 0)); endTurnButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { @@ -158,8 +162,6 @@ class PlayerPanel extends JPanel implements IPlayerPanel { PlayerPanel() { setLayout(null); - setBackground(Color.LIGHT_GRAY); - createLeftPanel(); add(leftPanel); -- cgit v1.2.3