Subj : embedding rhino To : netscape.public.mozilla.jseng From : "Jens Günther" Date : Wed Jun 18 2003 07:04 pm hi ng, is there a possibility to use more than one constructor in a java-class? example: I want to create a color class and access it via js: public class Color extends ScriptableObject { // constructor used by rhino public Color(){} // js: foo = new Color( numeric,numeric,numeric) will call this method: public void jsConstructor( Number r, Number g, Number b ) { ... } ... } ok, this works fine. but now i want to use another constructor in js like: foo = new Color( r,g,b,alpha ) i had choosed to add another jsConstructor(...)-method but when i was testing this the rhinoshell throws an exception: there can be only one jsConstructor-method. i'm stucked... is there any possibility to use more than one js constructor? thanks in advance, Jens .