Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Knute Johnson Newsgroups: comp.lang.java.programmer Subject: Re: How do you update a component when you leave on a drag? Date: Fri, 13 Oct 2017 14:04:54 -0500 Organization: A noiseless patient Spider Lines: 14 Message-ID: References: <255e35fe-5f4f-4916-89c5-f5d07b74ca3c@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 13 Oct 2017 19:05:30 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="03b8c8486d2e1ba0ce62cc1d7360ba76"; logging-data="2089"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Z2aev3p9CnGZe3YCe3qxl" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 In-Reply-To: <255e35fe-5f4f-4916-89c5-f5d07b74ca3c@googlegroups.com> Content-Language: en-US Cancel-Lock: sha1:uggB/R1ztJKVlwG7QQ/lLhtAwnk= Xref: csiph.com comp.lang.java.programmer:37570 On 10/13/2017 12:42, Eric Douglas wrote: > I wrote a custom TransferHandler, which is changing the appearance of a custom JTable through it's custom UI. > I put the method call to change the appearance in the canImport method, but this method is only getting called as I drag over the control. What method should I be updating to tell it I was dragging over that control and have left the bounds of that control so I can restore it's appearance? > Do you want to update it while you are still dragging? I'm not sure but have you tried calling validate() based on the mouse position? You may still have problems in that the EDT is blocked by your drag operation. Can you make an SSCCE? -- Knute Johnson