I am building a JavaFX app and i want it to implement Spring's SmartLifeCycle interface to perform tasks when the main class terminates. A JavaFX main class must extend the Application class which contains a stop() method. The SmartLifeCycle interface also contains a stop method. It looks like these 2 methods refuse to co-exist even if they have different method signatures. The JavaFX method extended from the Application class has no parameters and throws an exception while the implemented method from SmartLifeCycle takes a Runnable object as an argument.
Is it possible for both these methods to exist in the same class? Both are required to implement by subclasses therefore the compiler complains no matter what i do.
Thanks