• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Converting An Application to An Applet (Java) and Adding Fonts and Images to Applet

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Converting an Application to an Applet (Java) and adding fonts, images
Java Application to Applet on ArithmeticTest
Hello,
I would like to know how I can convert an application to an applet.
Here's the code:
//listing 3.1
class ArithmeticTest
{
public static void main (String args[]) {
short x = 6;
int y = 4;
float a = 12.5f;
float b = 7f;
System.out.println("x is " + x + ", y is " + y);
System.out.println("x + y = " + (x + y));
System.out.println("x - y = " + (x - y));
System.out.println("x / y = " + (x / y));
System.out.println("x % y = " + (x % y));
System.out.println("a is " + a + ", b is " + b);
System.out.println("a / b = " + (a / b));
try{ System.in.read();}
catch (java.io.IOException ioe){}
}
}

This is a console application that I can run into MS-DOS to see if this works. I would like to know how I can covert this to make this a java applet.
I also would like to know how to add images, or fonts together with this applet that I'm trying to do.
Email me if you can. My email is XxSweetAngelz@aol.com
Thanks,
Eleanor
 
Seriously? That's what you're going with? I prefer this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic