Help with passing variables


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Help with passing variables

  1. #1
    Randy Guest

    Help with passing variables


    I have been working with the following code with no sucess.
    The needed result is to print the variable to the applet. In the future
    I also want to send a query string to an asp page containing the variable.

    public class test17 extends Applet{
    public String theName;
    public void main(String args[]) {
    theName ="testing";
    }
    public void paint (Graphics g) {
    g.setFont(new Font("Helvetica",Font.PLAIN,12));
    g.drawString("Name:"+theName, 10, 250);
    }

    Thank you for any help with this.

    Randy

  2. #2
    UP Guest

    Re: Help with passing variables


    DO you really want to use main method with applet? and again if you want to
    convert that applet to an application syntex of main method is public static
    void main(String[] args)

    "Randy" <randy@psi-games.com> wrote:
    >
    >I have been working with the following code with no sucess.
    >The needed result is to print the variable to the applet. In the future


    >I also want to send a query string to an asp page containing the variable.
    >
    >public class test17 extends Applet{
    >public String theName;
    >public void main(String args[]) {
    > theName ="testing";
    > }
    >public void paint (Graphics g) {
    > g.setFont(new Font("Helvetica",Font.PLAIN,12));
    > g.drawString("Name:"+theName, 10, 250);
    > }
    >
    >Thank you for any help with this.
    >
    >Randy



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center