wood burning stoves 2.0*
The moose likes Applets and the fly likes Simple: Turning A Program Into An Applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Simple: Turning A Program Into An Applet" Watch "Simple: Turning A Program Into An Applet" New topic
Author

Simple: Turning A Program Into An Applet

Jason Newman
Ranch Hand

Joined: Oct 20, 2010
Posts: 53
This is my first attempt to turn some of my programs into applets for my class portfolio project for WebDesign. I'm going to take some programs and turn them into applets to be used and what not. I've never done this before, and all help will be greatly appreciated. Also here is the code and exejars for my programs.

Addition: http://www.mediafire.com/file/s2yv22754u5240k/Addition.jar



Tic-Tac-Toe with AI(Code only, I couldn't get this into a jar)



Color Chooser http://www.mediafire.com/file/447zy7c9tqrwd1p/Color%20Slider.jar


Thank you!
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
This may help: http://www.acme.com/resources/classes/Acme/ApplicationApplet.java
Jason Newman
Ranch Hand

Joined: Oct 20, 2010
Posts: 53


How do I 'use' it?
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
I'd start by reading the comments at the top of the class. It gives an example of how to use it.
Other than that, it's an applet - are you familiar with how to deploy applets in general?
Jason Newman
Ranch Hand

Joined: Oct 20, 2010
Posts: 53
I feel stupid, but no I don't. Not at all. Not even a little.
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
In that case, check out http://download.oracle.com/javase/tutorial/uiswing/components/applet.html. You need a Java class that extends javax.swing.JApplet, and an HTML file that contains an APPLET tag that points to this class. That page has an example of both; start by getting that up and running.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Simple: Turning A Program Into An Applet
 
Similar Threads
Calling the repaint() method
X and O game
ui manager getColor and link JOptionpane OK button to code
Buttons...
tictactoe help