TheObserver
Programmer
I'm doing development in Forte/Studio One, and I keep hitting this problem...I keep trying to work around it, but it's getting harder to do so due to the subsequent methods I need to have called.
Basically, I have an application with a JDesktopPane and several JInternalFrames within it. I need to detect both when the JInternalFrames are moved, and when they are removed (closed) from the JDesktopPane. However, if an event of "moved" (componentMoved, if I remember correctly) occurs, the "removed" (componentRemoved) event is also triggered, and vice versa. I can't trigger one without triggering the other. Filtering one from the other can be done in some use cases, but in others there's no way to avoid it, codewise.
As I mentioned, I'm using Suns' Studio One for dev work, and as such, when an event is added to the code, the listeners are also automatically added. I've given the listeners a glance and they appear okay, but haven't felt the need, as of yet, to look much deeper than I have.
What could be causing this double-triggering problem, and how can it be solved?
Basically, I have an application with a JDesktopPane and several JInternalFrames within it. I need to detect both when the JInternalFrames are moved, and when they are removed (closed) from the JDesktopPane. However, if an event of "moved" (componentMoved, if I remember correctly) occurs, the "removed" (componentRemoved) event is also triggered, and vice versa. I can't trigger one without triggering the other. Filtering one from the other can be done in some use cases, but in others there's no way to avoid it, codewise.
As I mentioned, I'm using Suns' Studio One for dev work, and as such, when an event is added to the code, the listeners are also automatically added. I've given the listeners a glance and they appear okay, but haven't felt the need, as of yet, to look much deeper than I have.
What could be causing this double-triggering problem, and how can it be solved?