On most platforms in most programming whenever I only want to run an event once and ignore other events of the same kind, I generally use a static variable to set a flag. (or a global variable or a class member variable, if statics are not available or if I need to use the same variable to block all events while one of them is running). I mainly do C/C++, but it's extremely similiar in format in Java too. May need minor tweaks. The important thing here is
static so you remember the last state of the variable between execution of events. But this could easily be a class member, as the class members are persistent (like static) between event calls. Or in the worst case scenario, a global variable can be used instead.
Code:
WhateverEventxxx40; xxx41;
xxx123;
static boolean bEventRunning = FALSE; // Only initialized on first execution
if xxx40;bEventRunningxxx41;
xxx123;
// The event is already running, exit immediately
return;
xxx125;
bEventRunning = TRUE;
// Do your deed --
// Put your event code here.
bEventRunning = FALSE;
xxx125;