I'm trying to implement a UserInterface interface, which always needs to run in a thread (so is Runnable). So I have code like this, where SpecificInterface implements UserInterface:
UserInterface myUI = new SpecificInterface(...);
Thread thread = new Thread(myUI);
thread.start();
But this obviously doesn't work, because I can't make UserInterface implement Runnable since interfaces can't implement other interfaces. And I can't just make SpecificInterface runnable since that defeats the point of using interfaces.
How am I supposed to make this work? Do I need to make UserInterface an abstract class, or create a RunnableInterface abstract class which implements UserInterface and Runnable and inherit my UI's from it, or..? I am rather confused as to why the "simple" solution can't work.
Googling was less than helpful, all I find is links telling me how to use the "Runnable interface" :|
UserInterfaceand theSpecficInterfaceclass?run()method (this is for an exercise).