Open Another Class

Hello all, first post here. Hope to get a good response. :)

I know how to call other methods in other class's.

How do i get one class to run, when its running it opens another class (this class has to start from main) that does something else.

Just to add to this, is there a way i can create a class which opens a collection of classes. Reason is: I want to open a splash screen, while this is running I want an audio file to play, once the splash screen closes (2seconds later). I want a final class to run and the audio file to continue playing.

Thanks for any help. :)

[604 byte] By [abshirf2a] at [2007-11-26 18:47:02]
# 1
Do you mean run another program written in Java or simply another class. Why can you not instanciate the class from the first class and so on via the contructors of these other classes?
kikemellya at 2007-7-9 6:20:58 > top of Java-index,Java Essentials,New To Java...
# 2
Oh thanks, thats a good idea!It will work it just means that i have to move some stuff from the main method.I will do what you suggested but is there another way without having to instantiate.BTW, i just mean open another class to run.
abshirf2a at 2007-7-9 6:20:58 > top of Java-index,Java Essentials,New To Java...
# 3

I'm not sure if I understood your question correctly, but you can invoke the main(String[]) of the other class.

YourClass.main(new String[0]); // main is static

// OR

YourClass.main(arguments);

#

duckbilla at 2007-7-9 6:20:58 > top of Java-index,Java Essentials,New To Java...
# 4
Brilliant i think that will work.Thank you all. :)
abshirf2a at 2007-7-9 6:20:58 > top of Java-index,Java Essentials,New To Java...