Origin for Panel

This commit is contained in:
Frank 2022-07-15 12:29:47 +02:00
parent 0c8ad6896a
commit 06d7848e30

View file

@ -23,7 +23,11 @@ public class Panel implements ComponentWithBounds, RelativeContainerEventHandler
public final Rectangle bounds; public final Rectangle bounds;
public Panel(int width, int height) { public Panel(int width, int height) {
bounds = new Rectangle(0, 0, width, height); this(0, 0, width, height);
}
public Panel(int left, int top, int width, int height) {
bounds = new Rectangle(left, top, width, height);
} }
public void setChild(Component<?> c) { public void setChild(Component<?> c) {