Article View: borland.public.jbuilder.java.swing
Article #778Presence of toolbar shifts coordinates
From: Ramon F Herrera
Date: Thu, 23 Dec 2004 17:40
Date: Thu, 23 Dec 2004 17:40
24 lines
1807 bytes
1807 bytes
I am writing a simple Swing application that has a JToolbar which can be docked against the menu bar or floating around (in its own little window). A problem occurs when the user is rubberbanding. When the JToolbar is not docked, the coordinates work as they should and the dotted rectangle is drawn under the mouse pointer. When the JToolbar is docked, however, the rectangular rubberband shows up several pixels above the mouse pointer. I guess I need to have some event captured when the toolbar is [un]docked and compensate the coordinates with an appropriate offset. What event(s) should I have listeners for? TIA, -Ramon F Herrera ps: I wonder if this is a Java bug...
Technical Details
Message-ID:
<41cb0326$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news4.google.com!news.glorb.com!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 111d45,11e54d452034a069,start X-Google-Attributes: gid111d45,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Thu, 23 Dec 2004 12:40:56 -0500 From: Ramon F Herrera <ramon@jonjay.com> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing Subject: Presence of toolbar shifts coordinates Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.128.127.111 Message-ID: <41cb0326$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1103823654 24.128.127.111 (23 Dec 2004 09:40:54 -0800) Lines: 25 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news4.google.com!news.glorb.com!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail