File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Duplication problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Duplication problems" Watch "Duplication problems" New topic
Author

Duplication problems

Casen Densmore
Greenhorn

Joined: Jan 22, 2004
Posts: 14
I am having the problem of an actionListener duplicating, or perhaps an error in my code. When ther user clicks the arrow_left1 button it move nodes from one tree into the another. When they click the save1 button it saves the current information. The problem comes when I try moving stuff over after I have saved the information. For some reason it duplicates itself. The first time I click save it duplicates once, the second time...twice etc....

relevant code is below....
//if save button is pressed
save1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent event) {


Output:
got here
got here

On one click of arrow_left1 after saving got here is printed out twice... Any reason why it would be doing that?
Casen Densmore
Greenhorn

Joined: Jan 22, 2004
Posts: 14
Ya....it was just bad programming.....
 
wood burning stoves
 
subject: Duplication problems