Article View: borland.public.jbuilder.java.swing
Article #13350Re: getLocation of JPanel
From: Paul Furbacher
Date: Mon, 17 Aug 1998 00:00
Date: Mon, 17 Aug 1998 00:00
24 lines
1448 bytes
1448 bytes
John P. McGrath wrote: > > Duc Dat Tran <duc-dat.tran@nooft.abb.no> wrote: > > > Can someone tell me why I always get x=0 and y=0 when : > > > > jpanel.getLocation(); is executed, > > > > even if the jpanel is located in the middel of the screen. > > If the location is being set by a layout manager (even an XYLayout), > and you are printing the location before the JPanel is made visible, > it will show a location of [0,0]. Good point. For this reason, while debugging, I put the "tell me the location of this object" in a mouseEnter() method and either show it in the status bar or in the execution log. Say, John, could you set your editor to wrap lines with a hard return at a length of < 80 chars? Currently, you don't wrap lines, and quoting you is, well, a pain. Thanks. Paul Furbacher
Technical Details
Message-ID:
<35D81345.DC1C0E89@bilbo.bio.purdue.edu>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<35D1A018.AFCA7BF5@nooft.abb.no> <01bdc9a2$0529c3b0$3347aacc@ferd>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,e3cf5a768167666a X-Google-Attributes: gid111d45,public From: Paul Furbacher <pf@bilbo.bio.purdue.edu> Subject: Re: getLocation of JPanel Date: 1998/08/17 Message-ID: <35D81345.DC1C0E89@bilbo.bio.purdue.edu> X-Deja-AN: 381917797 Content-Transfer-Encoding: 7bit References: <35D1A018.AFCA7BF5@nooft.abb.no> <01bdc9a2$0529c3b0$3347aacc@ferd> Content-Type: text/plain; charset=us-ascii Organization: Biological Sciences, Purdue Univ. Mime-Version: 1.0 Reply-To: pf@bilbo.bio.purdue.edu Newsgroups: borland.public.jbuilder.java.swing