Solved

extend thread and frame?

Posted on 2003-11-24
3
298 Views
Last Modified: 2008-03-06
public class serverz extends Frame

Hi
this is the code im using to define a class but i also want to extend Thread, how do i do this?
Cheers
0
Comment
Question by:irish_paddy
  • 2
3 Comments
 
LVL 92

Accepted Solution

by:
objects earned 50 total points
ID: 9814663
You shouldn't need to extend Thread, implementing Runnable sjhould be sufficient.

public class serverz extends Frame implements Runnable


You can then create a thread with:

new Thread(new serverz());
0
 

Author Comment

by:irish_paddy
ID: 9814732
Cheers,
0
 
LVL 92

Expert Comment

by:objects
ID: 9814739
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now