Click here to Skip to main content
15,880,956 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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.
Posted
Comments
Sergey Alexandrovich Kryukov 1-Mar-15 20:37pm    
Sorry, slowing down makes no sense, as well as using Thread.Sleep for this purpose. You just have to design reasonable behavior.
—SA
Mehdi Gholam 2-Mar-15 2:20am    
It would make sense if you are into zen philosophy :)
Sergey Alexandrovich Kryukov 2-Mar-15 2:24am    
Then I would not search anything. The page I need will find me.
:-)
jchacon28 1-Mar-15 22:11pm    
Since the search methods, and the gui are on two different classes, i am not sure how to make the buttons "glow" as i iterate through the array.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900