How to use HTML parameters in Java applet

Hello
In perl I have created a form with things like a selectiuon box called currency and text fields called product for example. Then when I click submit the perl program can pick up the currency and product parameters.
I have read about applet param eg <param name="param1" value="Apple"> is this the same thing? Or is it different?
Can I use HTML parameters or do I need to use applet param? I am confused.
If applet param is what I need, then how do I change the param values say by editing text in a text field?

You will need to use Java Native Interface JNI. Ther are many posts on the subject, please search, and this is the documentation:
http://java.sun.com/j2se/1.5.0/docs/guide/jni/spec/jniTOC.html

Similar Messages

  • How to use C-Structure in java applets

    hi alls,
    I want to use a struct model (struct in C++) in java applets. i know class is used in java applications. but, how can i convert in java applets?
    class renk
    int r;
    int gr;
    int b;
    import java.awt.Graphics;
    import java.awt.Color;
    import java.awt.Event;
    import java.applet.Applet;
    public class benek extends Applet
    final int n=10;
    int x[] = new int[n];
    int y[] = new int[n];
    int count = 0;
    renk clr[] = new renk[n];
    public void init()
    setBackground(Color.black);
    public boolean mouseDown(Event yordam, int xyer, int yyer)
    if (count<n)
    System.out.println("...");
    ekle(xyer,yyer);
    else System.out.println("Kapasite Doldu...");
    return true;
    void ekle(int xyer, int yyer)
    int r1 = (int)Math.floor(Math.random()*256);
    int gr1 = (int)Math.floor(Math.random()*256);
    int b1 = (int)Math.floor(Math.random()*256);
    clr[count].r = r1;
    clr[count].gr = gr1;
    clr[count].b = b1;
    x[count]=xyer;
    y[count]=yyer;
    count++;
    repaint();
    public void paint(Graphics g)
    it gives error message... how can � use struct model in java applets???
    if you help me i will be greatfull....

    � use import but it doesn't work.
    i add: import renk; or import class renk;
    how will � add import I assumed based on your initial post that the renk and benek classes were in the same file. Apparently you're saying they are not. So for another thing, make your renk class "public class renk", and add the "public" keyword to the 3 members of that class. Then if your code still doesn't see the "renk" class, it would just be that you don't have the directory that contains the compiled "renk.class" in your classpath.

  • How to Use DLL Function in Java Applet

    Hi all,
    I have been assigned a task to develop java applet. The problem is, I need to use DLL functions in my applet to read records. Could you pls anyone guide me how to interface DLL and applet to read records with sample code?
    I'm using JDK 1.5.0_06 and Windows XP OS. thanx..
    best rgds,
    jpdbay

    You will need to use Java Native Interface JNI. Ther are many posts on the subject, please search, and this is the documentation:
    http://java.sun.com/j2se/1.5.0/docs/guide/jni/spec/jniTOC.html

  • How to use html tags inside java

    I have to retrieve data from db and return the data to my index.jsp page.
    Its working fine.
    But I have o display in a pable format using html. How to embed html tags? I tried this way. Its not working. Any suggestions?
       String htmlOpen = "<html>";
        String htmlEnd = "</html>";
        String titleOpen ="<title>";
        String titleEnd ="</title>";
        String bodyOpen = "<body>";
        String bodyEnd = "</body>";
        for (int i = 1; i <= cols;i++){
            output = output + rsmd.getColumnName(i);
         while (rst.next()) {
            for (int i = 1; i <= cols;i++){
                      output = output +rst.getString(i);
      result = htmlOpen + titleOpen + titleEnd + bodyOpen + output+ bodyEnd + htmlEnd;
        stmt.close();
        conn.close();
         return htmlOpen;
      }

    See those charcters in your JSP that look like "<%"? Those characters mean: "the code after this is Java - interpret it as such".
    Then when you close your Java block with "%>", it then means: "the code after this is html - output it to the request response that is being built. However, within the html code, the syntax "<%= java_variable_name %>" means "take the current value of that Java variable and insert it into the html output".
    Here's an example:
    %>
    <table cellspacing="2" cellpadding="2" border="1">
    <tr>
    <%
        String s = null;
        for (int i = 1; i <= ncol; i++)
          s = rsmd.getColumnName(i);
    %>
      <th nowrap><A HREF="<%=sortLink.toString()%>&sortby=<%=s%>"><%= s %></th>
    <%
    %>
    </tr>
    <%
        if (rs == null || numRows <= 0)
          %><tr><td colspan="10" nowrap>No data available for specified query.</td></td><%
        else
          int rowCounter = 0;
          while(rs.next() && rowCounter < PAGE_SIZE)
            rowCounter++;
    %>
      <tr><%
            for (int i = 1; i <= ncol; i++)
              s = rs.getString(i);
              if (rsmd.getColumnName(i).equalsIgnoreCase("password"))
                    %><td nowrap>********</td>
    <%
              else
                %><td nowrap><%= s %></td>
    <%
            %></tr><%
    %>
    </table>This is JSP 101, what they teach in the first hour of class...
    Here's a decent JSP tutorial:
    http://www.jsptut.com/

  • How use the jtable in java applete

    hi master
    sorry i again Disturb you
    sir pleae give me idea how i use the jtable in java applete
    please send me code
    thank's
    aamir

    Hi,
    see http://www.exampledepot.com/
    Frank

  • How to use HTML Tags in webdynpro java

    Hi,
         Can any body tell me how to use HTML Tags in webdynpro java.
    If u provide me with sample code it will become more usefull.
    Thanks & Regards,
    SN

    HI,
    Please find the steps:
    Create a html file and store in your webdynpro project
    Add the html contents in your file
    & Create a IFRAME UI element and refer you html file
    Now you able to see the html in webdynpro
    Thanks & Regards,
    Ram

  • How To Call HTML Page Through Java Swing Page  ???....

    Hi All ;
    Please Can You Tell Me How To Call HTML Page Through Java Swing Page ....
    Regards ;

    Hi,
    you can use HTML fragments on a panel.
    http://java.sun.com/docs/books/tutorial/uiswing/components/html.html
    However, to integrate a browser you need 3rd party software like IceBrowser
    If you Google for: HTML Swing
    then you find many more hints
    Frank

  • How to insert html table inside java code

    Hi,
    I want to send an email with data in table format(with rows and columns) .Please tell me how to achieve this in java code .I just want to know the code for making the table in java
    Please help me
    Thanks in advance

    NewUser7 wrote:
    Please tell me how to generate html tables in java. .. Do you know how to produce an HTML table in HTML?
    ..i dont have jspI did not mention JSP. Pure J2SE code can produce HTML, though if done in a web-app., it would generally be done using JSP or Servlets.
    Here is an example of producing HTML in J2SE.
    import javax.swing.*;
    class HtmlTable {
         public static void main(String[] args) {
              int[][] values = {
                   {1,3894,5387},
                   {2,4112,4459},
                   {3,4886,6076}
              String prefix = "<html><body><table>\n";
              final StringBuilder sb = new StringBuilder(prefix);
              sb.append("<tr>");
              sb.append("<th>");
              sb.append("Month");
              sb.append("</th>");
              sb.append("<th>");
              sb.append("Unit A<br>Sales");
              sb.append("</th>");
              sb.append("<th>");
              sb.append("Unit B<br>Sales");
              sb.append("</th>");
              sb.append("</tr>\n");
              for (int ii=0; ii<values.length; ii++) {
                   sb.append("<tr>");
                   for (int jj=0; jj<values[ii].length; jj++) {
                        sb.append("<td>");
                        sb.append("" + values[ii][jj]);
                        sb.append("</td>");
                   sb.append("</tr>\n");
              sb.append("</table>");
              sb.append("</body>");
              sb.append("</html>");
              Runnable r = new Runnable() {
                   public void run() {
                        JOptionPane.showMessageDialog(
                             null,
                             new JTextArea(sb.toString(),20,10) );
                        JOptionPane.showMessageDialog(
                             null,
                             new JLabel(sb.toString()) );
              SwingUtilities.invokeLater(r);
    As an aside, those terms are HTML (an abbreviation) Java (a proper name) & JSP (an abbreviation). Please try to use correct upper/lower case when using technical terms.

  • How to use HTML Tags in Smartforms

    Hi,
    Can you please help me out in knowing how to use HTML tags in Smartforms,
    suppose i want to display some text in BOLD i should use the tag </b> as shown
    </b>  Header Information <b>
    regards
    Ranveer

    Hi Ranveer ,
        check this following links,
      hope this wil helps you
    <a href="http://sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/smartforms/smartform%20in%20abap.pdf">check this link,to know abt HTML in smartforms</a>
    rgds,
    shan

  • How to use sql query in java ?

    i don't know how to use sql query in java code.
    who can give me some advice?
    thanks

    http://java.sun.com/developer/onlineTraining/Database/JDBC20Intro/

  • How to use " toFront() " method in java application and in which package or

    How to use " toFront() " method in java application and in which package or class having this toFront() method.if anybody know pl. send example.

    The API documentation has a link at the top of every page that says "Index". If you follow that and look for toFront(), you will find it exists in java.awt.Window and javax.swing.JInternalFrame.
    To use it in a Java application, create an object x of either of those two classes and write "x.toFront();".

  • How to use XML / XPath in JAVA (in 1.4) which third part component to use?

    How to use XML / XPath in JAVA (in 1.4)
    I'm absolutely novice in XML
    but I need to query XML using XPath
    As I understand XPath become avalible only in Java 1.5
    But I use 1.4 (project requirement)
    Which third part component could you recomend?

    Can anyone help me with this XPath query
    I get result [title: null]
    import java.io.*;
    import javax.xml.parsers.*;
    import org.xml.sax.*;
    import org.w3c.dom.*;
    import org.jaxen.*;
    import org.jaxen.dom.*;
    import org.jaxen.saxpath.*;
    import java.util.*;
    public class TestX {
         public void ggg() {
              try {
                   File f = new File("journal.xml");
                   DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
                   org.w3c.dom.Document doc = docBuilder.parse(f);
                   XPath xpath = new DOMXPath( "/journal/article/title" );
                   List result = (List) xpath.evaluate(doc);
                   System.out.println(result.get(0));
              } catch (Exception e) {
                       e.printStackTrace();
         public static void main(String[] args) {
              TestX tx = new TestX();
              tx.ggg();
    }journal.xml
    <journal>
        <article id="article.1">
            <title>Art1</title>
            <author>
               <first>Bob</first>
               <last>McWhirter</last>
            </author>
            <text>
            </text>
        </article>
        <article id="article.2">
            <title>Art2</title>
            <author>
               <first>James</first>
               <last>Strachan</last>
            </author>
            <text>
            </text>
        </article>
    </journal>

  • How to use openjpa  + kodo in Java SE?

    Hi.
    We are developing J2EE application on Weblogic Server 9. For a part of application we should create unit tests that will be run in Java SE. How to use openjpa + kodo in Java SE?

    Hi,
    Try the EclipseLink JPA JEE5/JEE6 provider - it has been shipping as part of WebLogic Server since 10.3.1.0.
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    The following page has several SE, application-managed and container-managed EE example tutorials with source.
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial
    http://wiki.eclipse.org/EclipseLink/Examples/JPA
    The following forum will help you with any JPA specific issues.
    Forum: TopLink/JPA
    TopLink/JPA
    thank you
    /michael
    http://www.eclipselink.org

  • How to use HTML or XML described visual forms for data entry in Java app?

    Hi,
    We are considering to use HTML as a mean of configuration for visual content and layout of data entry dialogs in our Java GUI applications. Java program will need to be able to populate/collect data into/from dialog controls. I am guessing that JEditorPane and FormView classes could be used for this but I have not figured out yet how to do this.
    I would really appreciate any help you could provide with respect to this. Please share any tips, utilities, references, etc. Maybe one can suggest non-HTML (e.g. XML, UIML, ...) way to achieve the same requirements and recommend some utilities respectively.
    Thanks.
    -Vitaly

    Just to clarify, we need a solution for Java application (no applet, no web server, no servlets, no JSPs, no EJBs).
    -Vitaly

  • How to keep HTML code in the applet source (.java) file itself?

    Hi,
    How to keep HTML code (APPLET tag) in the applet source (.java) file itself?
    Please give an example?
    thank you,

    R6i wrote:
    ...What I mean is without writing external HTML file, how to run an applet (during practice)?'Practice'? What does that mean? During development? If that is what you are referring to, add an applet tag at the top of YourApplet.java inside a Java comment area. Then AppletViewer (in recent SDKs) can then run it with just..
    prompt:javac YourApplet.java
    prompt:// the '.java' extension is not a mistake
    prompt:appletviewer YourApplet.javaIf you do not mean 'during development', then that brings us back to +"What advantages do you see that is bringing to the end user?".+

Maybe you are looking for