Added size methods

This commit is contained in:
Niclas Finne 2012-05-18 15:46:39 +02:00
parent 4254ad0720
commit c8a135bcea
2 changed files with 10 additions and 0 deletions

View File

@ -11,10 +11,18 @@ public class JFrameWindowManager implements WindowManager {
private JFrame window = new JFrame(name);
private boolean restored = false;
public void setSize(int width, int height) {
window.setSize(width, height);
}
public void setBounds(int x, int y, int width, int height) {
window.setBounds(x, y, width, height);
}
public void pack() {
window.pack();
}
public void add(Component component) {
window.add(component);
if (!restored) {

View File

@ -4,7 +4,9 @@ import java.awt.Component;
public interface ManagedWindow {
public void setSize(int width, int height);
public void setBounds(int x, int y, int width, int height);
public void pack();
public void add(Component component);
public void removeAll();