-
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
-
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
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks