aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes getting the dropped event problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "getting the dropped event problem" Watch "getting the dropped event problem" New topic
Author

getting the dropped event problem

Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 931
can anyone tell me how can i get the string/value of a droppable JTextfield, I mean, i have a text field and some JLabels, i m dropping the JLabels into textfield, nd i want, whatever the label i dropped i want to get/store that string/value, in a variable, how can i do this??
i did somthing like this, bt it's nt working:

class TextHandler implements ActionListener {
public void actionPerformed(ActionEvent evt) {

String disp = evt.getActionCommand();

JOptionPane.showMessageDialog(null, disp);
System.out.println(disp);
}
}

Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36497
    
  16
What is wrong with this?
Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 931
Campbell Ritchie wrote:What is wrong with this?


No, Actually my question is, whichever the label i dropped into the text field, i want to get that text, nt the label text, how can i do this?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36497
    
  16
Not sure I understand the question, but I know precious little about drag-n-drop. Sorry.

Anybody else?
Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 931
Campbell Ritchie wrote:Not sure I understand the question, but I know precious little about drag-n-drop. Sorry.

Anybody else?



it's okay Ritchie....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getting the dropped event problem
 
Similar Threads
how to show a jsp after bean procesing is done?
GarbageCollector
static methods
Array lists syntax in jsp
how to pass arraylist from jsp to java bean