Article View: borland.public.jbuilder.java.language
Article #17331Re: Disposing of a frame
From: Geoff Austin
Date: Tue, 01 Dec 1998 00:00
Date: Tue, 01 Dec 1998 00:00
25 lines
1448 bytes
1448 bytes
If you are sure the recieved object is a frame then cast it to Frame before
disposing it.
If you are not sure, use if ( v instanceof Frame) { Frame f = (Frame)v;
f.dispose() }
Leo Cohen wrote in message <366312C6.92972C0C@cs.virginia.edu>...
>I have a method that receives a variable, v, of type Object. v is
>actually one of several possible frames that has been cast to Object. I
>would like to dispose() of the associated frame, and have tried
>v.getClass().dispose(). However, the compiler tells me that the
>dispose() method is not found in the java.lang.Class.
>
>Threfore, given (Object v), how can I dispose() of v?
>--
>Leo Cohen
>
>116-1 Howard Drive
>Charlottesville, VA 22903
>
>804-243-8922 (UVA)
>804-244-4648 (home)
>804-244-7922 (fax)
>lcohen@cs.virginia.edu
Technical Details
Message-ID:
<73vtsh$n4d$1@ubnnews.unisource.ch>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<366312C6.92972C0C@cs.virginia.edu>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,7c91af6c592c4d07 X-Google-Attributes: gidf74b3,public From: "Geoff Austin" <austin.geoff@pmintl.ch> Subject: Re: Disposing of a frame Date: 1998/12/01 Message-ID: <73vtsh$n4d$1@ubnnews.unisource.ch> X-Deja-AN: 417365102 References: <366312C6.92972C0C@cs.virginia.edu> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 X-Complaints-To: news@ubnnews.unisource.ch X-Trace: ubnnews.unisource.ch 912489169 23693 (None) 194.209.91.2 Organization: Unisource Business Networks (post doesn't reflect views of Unisource) Newsgroups: borland.public.jbuilder.java.language