Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #37570

Re: How do you update a component when you leave on a drag?

From Knute Johnson <nospam@rabbitbrush.frazmtn.com>
Newsgroups comp.lang.java.programmer
Subject Re: How do you update a component when you leave on a drag?
Date 2017-10-13 14:04 -0500
Organization A noiseless patient Spider
Message-ID <orr2pd$219$1@dont-email.me> (permalink)
References <255e35fe-5f4f-4916-89c5-f5d07b74ca3c@googlegroups.com>

Show all headers | View raw


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

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How do you update a component when you leave on a drag? Eric Douglas <e.d.programmer@gmail.com> - 2017-10-13 10:42 -0700
  Re: How do you update a component when you leave on a drag? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2017-10-13 14:04 -0500
    Re: How do you update a component when you leave on a drag? Eric Douglas <e.d.programmer@gmail.com> - 2017-10-13 13:02 -0700
      Re: How do you update a component when you leave on a drag? Eric Douglas <e.d.programmer@gmail.com> - 2017-10-16 06:07 -0700

csiph-web