🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.lenguajes.java
Article #26764

Re: Problema con add

#26764
From: Jonathan Revusky
Date: Fri, 04 Dec 1998 00:00
28 lines
1214 bytes

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: <3667FD53.A86EB1F5@jet.es>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3667D8A8.518E8BA7@iname.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 1116f3,c265076514babff
X-Google-Attributes: gid1116f3,public
From: Jonathan Revusky <jrevusky@jet.es>
Subject: Re: Problema con add
Date: 1998/12/04
Message-ID: <3667FD53.A86EB1F5@jet.es>
X-Deja-AN: 418641537
Content-Transfer-Encoding: 8bit
References: <3667D8A8.518E8BA7@iname.com>
X-Accept-Language: en
Content-Type: text/plain; charset=iso-8859-1
Organization: Telefonica Transmision de Datos
Mime-Version: 1.0
Reply-To: jrevusky@bigfoot.com
Newsgroups: es.comp.lenguajes.java