From d2c5268aa337d11ab55e8d2d6b2c13944a9548f9 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 2 May 2011 16:21:38 +0200 Subject: Fix frame insets git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@68 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/view/impl/View.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/jrummikub/view') diff --git a/src/jrummikub/view/impl/View.java b/src/jrummikub/view/impl/View.java index 482f692..a257034 100644 --- a/src/jrummikub/view/impl/View.java +++ b/src/jrummikub/view/impl/View.java @@ -60,7 +60,7 @@ public class View extends JFrame implements IView { @Override public void componentResized(ComponentEvent e) { Insets insets = getInsets(); - int x = insets.left, y = insets.top, width = getWidth() - insets.left + int width = getWidth() - insets.left - insets.right, height = getHeight() - insets.top - insets.bottom; int playerPanelHeight = even(Math.pow((double) width * width * height, @@ -71,9 +71,9 @@ public class View extends JFrame implements IView { int tableHeight = height - playerPanelHeight; - table.setBounds(x, y, width, tableHeight); + table.setBounds(0, 0, width, tableHeight); table.validate(); - playerPanel.setBounds(x, y + tableHeight, width, playerPanelHeight); + playerPanel.setBounds(0, tableHeight, width, playerPanelHeight); } }); -- cgit v1.2.3