Article View: es.comp.lenguajes.java
Article #26670Re: Problema con add
From: Alfredo Ayala Mu�oz
Date: Fri, 11 Dec 1998 00:00
Date: Fri, 11 Dec 1998 00:00
31 lines
1356 bytes
1356 bytes
Y por que no responde ya nadie ha esta pregunta?
Un saludo...
Jonathan Revusky escribi�:
> Fifeton wrote:
> >
> > Pero al llegar a esta parte del c�digo, me da una excepci�n:
> >
> > if (posicion>=0){
> > getParent().remove(this);
> > getParent().add(this);
> > }
> >
>
> Despues del remove(), �claro que el getParent() devuelve un null! Es
> l�gico. Piensalo. Necesitas algo as�:
>
> if (posicion>=0){
> Container parent = getParent();
> parent.remove(this);
> parent.add(this);
> }
>
> Jonathan Revusky
> --
> Available for Java and Delphi Consulting
> Make your .class files double-clickable
> with SmartJ
> http://www.bigfoot.com/~crystalline.solutions
Technical Details
Message-ID:
<36713AA1.9310D9B9@intersys.es>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3667D8A8.518E8BA7@iname.com> <3667FD53.A86EB1F5@jet.es>Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII X-Google-Thread: 1116f3,c265076514babff X-Google-Attributes: gid1116f3,public From: "Alfredo Ayala Mu�oz" <ayala@intersys.es> Subject: Re: Problema con add Date: 1998/12/11 Message-ID: <36713AA1.9310D9B9@intersys.es> X-Deja-AN: 421208153 Content-Transfer-Encoding: 8bit References: <3667D8A8.518E8BA7@iname.com> <3667FD53.A86EB1F5@jet.es> To: jrevusky@bigfoot.com Content-Type: text/plain; charset=iso-8859-1 Organization: Internet Systems Mime-Version: 1.0 Newsgroups: es.comp.lenguajes.java