Fix frame insets

git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@68 72836036-5685-4462-b002-a69064685172
This commit is contained in:
Matthias Schiffer 2011-05-02 16:21:38 +02:00
parent d967a61c02
commit d2c5268aa3

View file

@ -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);
}
});