• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Duplication problems

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ya....it was just bad programming.....
reply
    Bookmark Topic Watch Topic
  • New Topic