Java Applet data into a HTML document
Posted on 2003-03-31
I want to create a simple program that lets a user enter data and then converts/puts it into HTML format with tags.
The java applet contains 3 text fields (first, middle, and last name). A user enters information and then the applet stores it in an array or string. The user can then enter more information. Then when the user clicks a button it produces the code necessary to put it into a table in HTML or just a list.
(to signify seperate boxes I am using ,)
User enters in applet: Bob,,Smith Fred,Paul,Johnson James,Frederick,Jones
I would like it to show the HTML code so that someone can copy it to a HTML file
<p>Fred Paul Johnson
<p>James Frederick Jones
I want it to show the tags as well. So that someone can just copy that code into a HTML file and that will show:
Fred Paul Johnson
James Frederick Jones
I have tried using text fields but you can't seem to copy data from them and if you use drawString you can't copy that data. I have tried passing parameters using ? in the web address but how could I convert that into copyable HTML code.