java.awt.Container Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jtransc-rt Show documentation
Show all versions of jtransc-rt Show documentation
JVM AOT compiler currently generating JavaScript, C++, Haxe, with initial focus on Kotlin and games.
package java.awt;
import com.jtransc.widgets.JTranscWidgets;
import java.util.ArrayList;
public class Container extends Component {
protected JTranscWidgets.Widget createJTranscWidget() {
return JTranscWidgets.impl.createComponent("container");
}
private ArrayList children = new ArrayList<>();
public Component add(Component comp) {
comp.widget.setParent(this.widget);
children.add(comp);
comp.parent = this;
return comp;
}
public void paintAll(Graphics g) {
paint(g);
for (Component child : children) {
child.paintAll(g);
}
}
}