I have a GUI class, an ADT class, and a the main class that just instatiates the GUI class(everything is in this class). My GUI class creates an ADT Object with a bunch of integers, that are displayed on buttons.
I have 2 search methods, linear and binary(array is presorted) and i would like to use the Thread.sleep() method to slow down the process and see which element in the array i am focused on.
I have done this before but everything was in the main class. So i am a bit confused as to how to even start implementing it. I think that the ADT class should be the one that implements Runnable or extends Thread(not sure which to use). Also i know everything has to be done in the run() method, so do i create all my methods there?
Hopefully, it's clear the way i said it. Thank you.