It turns out that having a class use "implements Runnable" instead of extends Thread is the preferable way to do things like this. The class is then not an extension of a thread, but can be run by one!
I've actually completed my clock, but it's not very pretty, and annoying to understand. Here's the file if you want to look at it, though. I'll save the actual code and source for when it's not as confusing a mess as it currently is :D
http://www.megaupload.com/?d=GX5JJP08
Basically just letting you know I am working on it, it's just less friendly to write about than previous work :(
That's all for now. Questions welcome! Comments, too! Follow, subscribe, share etc, See you tomorrow!
And as part of a shameless plug for a friend, if you're interested in classic movies/books/music, visit his site here (fixed), and feel free to throw loads of criticism at us.
wow! this is helpful thanks men :)
ReplyDeleteNice one! A lot better than anything I could code in Java at the moment haha.
ReplyDeleteThanks man. This helped a little bit.
ReplyDeleteI want to code my own clock. (:
ReplyDeletenice code!
ReplyDeleteDamn, that's too bad. Hopefully you can find a better book or online tutorial.
ReplyDeleteSweet I voted twice in your poll!
ReplyDelete