Java tutorial
//package com.java2s; //License from project: Open Source License import java.awt.Container; import java.awt.Component; public class Main { private static void addToContainer(Container c, Component element) { if (c == null) return; c.add(element); } }