add constructor that does not depends on Applet.