Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #38018
| Newsgroups | comp.lang.java.programmer |
|---|---|
| Date | 2018-02-09 13:44 -0800 |
| References | <9b73b344-ccfd-4046-90ba-b0980bb1a8c6@googlegroups.com> |
| Message-ID | <65e4e9fb-4b25-4c58-bc6f-ebf6b7ca9e3b@googlegroups.com> (permalink) |
| Subject | Re: How to listen for drag/drop events? |
| From | Eric Douglas <e.d.programmer@gmail.com> |
On Friday, February 9, 2018 at 2:51:20 PM UTC-5, Eric Douglas wrote: > > I can't find anything on this short of creating a new custom TransferHandler, when all I want is notify events with that default behavior. I do need my JTextField to sometimes notify me only when my value changes between focusGain and focusLost, and sometimes notify me of all changes. I did set up the all changes to track on keyTyped events, though I notice that also picks up Enter and Tab which don't change the value. I could set up the key events and the drag/drop events using only the DocumentListener, but the stupid drop event is only sending it one character at a time, so if I drop in 4 characters I get 4 events when I only need one. The only workaround I can think of is to delay all document change events with some kind of Timer, to collect them and notify the change after not receiving any events for a few milliseconds. It sounds dumb to notify on every character when I'm dropping in multiple characters, when I'm using the change notification to send text out to filter another control.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to listen for drag/drop events? Eric Douglas <e.d.programmer@gmail.com> - 2018-02-09 11:51 -0800
Re: How to listen for drag/drop events? Eric Douglas <e.d.programmer@gmail.com> - 2018-02-09 13:44 -0800
Re: How to listen for drag/drop events? Eric Douglas <e.d.programmer@gmail.com> - 2018-02-12 08:56 -0800
csiph-web