Clicks on WindowBuilder and/or Button accumulate events (focushandler - elementbuffer)

I have differents nifty windows, so when I click in any part on the window, it looks like it is accumulating events, then when I click on button, this ‘event button’ is repeating as many times as I clicked on the window, plus one (this ‘event button’)

for example this window:

as you can watch in the ‘output console’, there is printing (repeating the method) the ‘event 0’, then ‘event1’ and ‘event2’, and so on. You can confirm this in the ‘system time’

the method that get the button click is:



public void onRefreshButtonClicked(final String id, final ButtonClickedEvent event) {


System.out.println(“EVENT:” + number + " - time:" + System.currentTimeMillis());




also, when I’ debbuging I found that the "elementBuffer’’, in the ‘‘focusHandler’’, is increasing each time that I click on the button or the screen.

for example the next image:

so I consider if I clean this ‘arraylist’ maybe the button event won’t repeat as many times as I clicked on ‘button+window’.

does anybody can give me some ideas to fix this??

thank you

Since your window looks like the standard window control I’m very confident that this commit fixed that issue →

well… it was made by WindowBuilder, and I updated (nightly included) the jMonkeyEngine and still has the problem, the same happens with my other issue.

do you have any other idea to fix it?? meanwhile, I will write some flags to avoid calling many time the same event, instead of one

Same answers as the other post: this fix is not in jme yet but will be in about a week.

1 Like