Forums Register Login

Duplication problems

+Pie Number of slices to send: Send
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?
+Pie Number of slices to send: Send
Ya....it was just bad programming.....
You showed up just in time for the waffles! And this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 822 times.
Similar Threads
java unable to delete from array list
filtering N number of leaf nodes per parent node
After rotating couldnt view
Dynamic JTree Components
Problem with dynamically setting the classpath at runtime
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 08:17:14.