calling applet from applet
Hi,
I am developing a chat application. In which I used socket connection. Now everything is ok but I have one requirement When user log in he or she must be asked for selecting room name. These rooms must be got from server. So room selection dialog must be applet and must astablish connection to server and get the room list and then allow user to select room and after selecting the room chat applet must be called.
So my question is how to call applet from applet.
Please give me answer.
from what i understood by what u said.. you r trying to call an applet on one html file to another applet!!! so i suggest that u put the second applet into a separate html file and then try to call that html file from your first html using this code
try { // create a new java.net.URL
URL urlToJumpToo = new URL("http://someUrl.tld"); // get the applet context and call the showDocument(URL) method on it this.getAppletContext.showDocument(urlToJumpToo);}
catch (MalformedURLException me) { // not a valid URL System.out.println("http://some.Url.tld is not a valid URL: " + me.getMessage());}