• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

convert frame to an applet

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to the Applets forum.
 
shanaya dutt
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
shanaya dutt
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's trivial to open a frame in an applet; something like "JFrame myFrame = new MyJFrameExtendingClass(); myFrame.setVisible(true);" should do the trick.

Note that applets have no access to the local file system unless they're signed; see HowCanAnAppletReadFilesOnTheLocalFileSystem for more information.
 
reply
    Bookmark Topic Watch Topic
  • New Topic