Results 1 to 1 of 1
- 03-16-2009, 06:34 PM #1Member
- Join Date
- Mar 2009
- Rep Power
making JTextField transparent to DND-Actions?
I would like to know, how I can (temporarily) prevent a JTextField to respond to DnD-Actions, or more precisely token, how to make them invisible to DnD.
I have a 4x5 grid pane filled alternating with JLabel and JTextField.
The JLabels are the drag source and the JPanel containing all components should be the drop target.
When I drag a JLabel over another JLabel, this is transparent and the JPanel is responding to the DnD events.
When I drag a JLabel over the JTextField, the JPane happens to see a dragExit(), which I would like to prevent.
I tried to use setEnabled(false) and setEditable(false), but it makes no difference. Neither does the opaque state of the JLabel change anything.
Any hint is welcome.
- By majkel in forum AWT / SwingReplies: 12Last Post: 10-09-2010, 05:06 PM
- By sumit1mca in forum AWT / SwingReplies: 1Last Post: 01-30-2009, 07:44 PM
- By audinue in forum Java 2DReplies: 3Last Post: 01-03-2009, 08:32 PM
- By datechie in forum AWT / SwingReplies: 2Last Post: 07-30-2008, 12:33 PM
- By Ada in forum AWT / SwingReplies: 1Last Post: 05-31-2007, 09:50 PM