All Downloads are FREE. Search and download functionalities are using the official Maven repository.

java.awt.Container Maven / Gradle / Ivy

Go to download

JVM AOT compiler currently generating JavaScript, C++, Haxe, with initial focus on Kotlin and games.

There is a newer version: 0.6.8
Show newest version
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);
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy