Results 1 to 2 of 2
Thread: Threads and subclasses
- 11-23-2011, 06:29 PM #1Member
- Join Date
- Oct 2011
- Athens, Greece
- Rep Power
Threads and subclasses
I want to create a thread inside the actionPerformed method of a "JFrame extends" class, that will run a spesific method.
How can i do that without messing with anonymus classes?
I thought to implement Runnable interface, to include my run methode and finally to create the new thead with the object that my class creates, which will be Runnable.
But this way i have to create a heavy object which has many fields and swing components, for simply creating a thread..
Does something more convenient exists??
- 11-23-2011, 07:44 PM #2
- By thorobred in forum New To JavaReplies: 6Last Post: 02-19-2011, 05:34 AM
- By MrFish in forum Advanced JavaReplies: 5Last Post: 11-07-2010, 01:28 AM
- By vinyacam in forum New To JavaReplies: 3Last Post: 05-09-2010, 07:12 PM
- By Sven in forum Advanced JavaReplies: 1Last Post: 12-22-2008, 06:06 PM
- By Ed in forum JDBCReplies: 2Last Post: 07-02-2007, 04:42 PM