I have created a gui using extend frame. What my program needs to do is replicate a DNS server, the DNSServer code has to be its own class, So to my project i have added class.

How do i acces the methode within the DNSServer Class?

for a static method:
Classname.Method()

for an instance method, then call it like this:
ReferenceToInstanceOfClass.Method()

hope that helps !

so for you it would be (if its a static method):

DNSServer.MethodName()

So in just by includeing, the class in the project, i don't have to do an import or include statement at the beginig of the code that has main?

If the classes are in the same project package, I think they should not require an import statement.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.