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:
parent
d967a61c02
commit
d2c5268aa3
1 changed files with 3 additions and 3 deletions
|
@ -60,7 +60,7 @@ public class View extends JFrame implements IView {
|
||||||
@Override
|
@Override
|
||||||
public void componentResized(ComponentEvent e) {
|
public void componentResized(ComponentEvent e) {
|
||||||
Insets insets = getInsets();
|
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;
|
- insets.right, height = getHeight() - insets.top - insets.bottom;
|
||||||
|
|
||||||
int playerPanelHeight = even(Math.pow((double) width * width * height,
|
int playerPanelHeight = even(Math.pow((double) width * width * height,
|
||||||
|
@ -71,9 +71,9 @@ public class View extends JFrame implements IView {
|
||||||
|
|
||||||
int tableHeight = height - playerPanelHeight;
|
int tableHeight = height - playerPanelHeight;
|
||||||
|
|
||||||
table.setBounds(x, y, width, tableHeight);
|
table.setBounds(0, 0, width, tableHeight);
|
||||||
table.validate();
|
table.validate();
|
||||||
playerPanel.setBounds(x, y + tableHeight, width, playerPanelHeight);
|
playerPanel.setBounds(0, tableHeight, width, playerPanelHeight);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Reference in a new issue