i had created my program that reads files from commandline arguments and shows the contents graphically on a frame.But now that program needs to be web enabled.So i need to convert it into an applet.How do i do that?
What, exactly, do you mean by "web enabled"? It's easy to write an applet that pops open the application frame you already have, but applets have no notion of command line parameters. The usual way of passing parameters to applets is through "param" tags in the applet tag, but those would be hard-coded in the HTML. If you need more flexibility, you may have to add a GUI to the applet where the user can set those parameters.
well,the program was built so that a frame opens up when file input is directly given through the command line.However,since frames run only at the local machine,i cannot use it for web anabling the program for everyone's access.So i need to convert it into an applet.I want to save the contents of the frmae into an applet now.
Joined: Mar 22, 2005
You really need to tell us what you mean by "web enabling" - you seem to use the term for more than just "put an applet on the web".
since frames run only at the local machine,i cannot use it for web anabling the program for everyone's access
What do you mean by this? What's the difference between running an application and an applet from a user's perspective? Does this have something to do with what you're referring to as "web enabling"?
Also, by "save the contents" do you mean that the applet needs to show the application frame? That's easily done - an applet has no problems opening a Frame.
Joined: Jul 02, 2009
Sir,I don't know any thing about "web enabling".this was the term used by my senior.My program runs from command line to take the file inputs and open a frame.What I'm required to do is to open the frame in an applet so that it can be used for the web.Thats all that i'm needed to do.
How should i go about doing this.I'm fairly new to java and not familiar with this stuff.Please guide me
Joined: Mar 22, 2005
It's trivial to open a frame in an applet; something like "JFrame myFrame = new MyJFrameExtendingClass(); myFrame.setVisible(true);" should do the trick.