Emergency! Help with flicker in applet!

I have used the bufferstrategy technique before and I know all about double buffering and all, but I normaly ama programming with Frames and Canvas instead of Applets. My applet is flickering as I update the images on the screen can a bufferstrategy be used? Can anyone help me solve this flickering issue with applets?
Thanks!
(This is somewhat of an emergency so i will be giving out stars ^.^ )a

Use JApplet not Applet, because JApplet is swing and is using JPanel as contentPane, and JPanel can be double-bufferised (true is default). You can also use the same buffer strategy.

Similar Messages

  • I need help with the Quote applet.

    Hey all,
    I need help with the Quote applet. I downloaded it and encoded it in the following html code:
    <html>
    <head>
    <title>Part 2</title>
    </head>
    <body>
    <applet      codebase="/demo/quote/classes" code="/demo/quote/JavaQuote.class"
    width="300" height="125" >
    <param      name="bgcolor"      value="ffffff">
    <param      name="bheight"      value="10">
    <param      name="bwidth"      value="10">
    <param      name="delay"      value="1000">
    <param      name="fontname"      value="TimesRoman">
    <param      name="fontsize"      value="14">
    <param      name="link"      value="http://java.sun.com/events/jibe/index.html">
    <param      name="number"      value="3">
    <param      name="quote0"      value="Living next to you is in some ways like sleeping with an elephant. No matter how friendly and even-tempered is the beast, one is affected by every twitch and grunt.|- Pierre Elliot Trudeau|000000|ffffff|7">
    <param      name="quote1"      value="Simplicity is key. Our customers need no special technology to enjoy our services. Because of Java, just about the entire world can come to PlayStar.|- PlayStar Corporation|000000|ffffff|7">
    <param      name="quote2"      value="The ubiquity of the Internet is virtually wasted without a platform which allows applications to utilize the reach of Internet to write ubiquitous applications! That's where Java comes into the picture for us.|- NetAccent|000000|ffffff|7">
    <param      name="space"      value="20">
    </applet>
    </body>
    </html>When I previewed it in Netscape Navigator, a box with a red X appeared, and this appeared in the console when I opened it:
    load: class /demo/quote/JavaQuote.class not found.
    java.lang.ClassNotFoundException: .demo.quote.JavaQuote.class
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.FileNotFoundException: \demo\quote\JavaQuote\class.class (The system cannot find the path specified)
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(Unknown Source)
         at java.io.FileInputStream.<init>(Unknown Source)
         at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown Source)
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 10 more
    Exception in thread "Thread-4" java.lang.NullPointerException
         at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
         at sun.plugin.AppletViewer.showAppletException(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    java.lang.NullPointerException
         at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
         at sun.plugin.AppletViewer.showAppletStatus(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)What went wrong? and how can I make it run correct?
    Thanks,
    Nathan Pinno

    JavaQuote.class is not where your HTML says it is. That is at the relative URL "/demo/quote/".

  • Need HELP with Stick Figure Applet

    I need help with this java program for college....we need to make a applet which displays a stick figure or some type of person using appleviewer..please can someone help me......
    email: [email protected]

    import java.awt.*;
    import java.applet.*;
    public class StickMan extends Applet {
         public void init() {
         public void paint(Graphics g) {
              g.drawOval(....);
              g.drawLine(....);
              g.drawLine(....);
              g.drawLine(....);
              g.drawLine(....);

  • Can anyone help with the java applet issue

    Hello everyone,
    This is my first thread in this forum,
    I need a little help with the form developer...
    I have oracle 9i db , 9i form developer
    I don't want to run the form i created as a java applet
    HOW IS THAT DONE i.e NOT IN THE INTERNET EXPLORER?????????
    ***IF ITS POSSIBLE

    Hello,
    I don't want to run the form i created as a java applet
    No chance, because the Web Forms client is an applet and cannot be anything else.
    Francois

  • Help with a simple Applet

    I am just starting Applets. This code compiles and a blank Applet displays but the Button object does not display. The HTML should be good because the blank Applet displays. Both files are saved in the same directory and my java code is compiled. Help?
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    public class WhosGreat extends Applet implements ActionListener
    Button btnGreat = new Button("Who's the Greatest?");
    Font LargeFnt = new Font("Times Roman",Font.BOLD,10);
    public void init()
    //btnGreat.setFont(LargeFnt);
    add(btnGreat);
    btnGreat.addActionListener(this);
    public void actionPerformed(ActionEvent e)
    String name = "Bugs Bunny";
    Label lblName = new Label("");
    lblName.setFont(LargeFnt);
    lblName.setText(name);
    add(lblName);
    invalidate();
    validate();
    }

    I compiled your code and ran it. It did just what you said in Internet explorer but it worked just fine in Netscape7 and appletviewer.Just remember microsoft sucks:)

  • Need help with buttons in applet

    stupid question maybe but i'm a beginner, and hey..there are no stupid questions, right? well, i may prove that wrong...anyway...
    I can't relocate a button, or any other component for that matter. When I try to make a simple applet with just one button showing, then it works perfect...but when I make the applet a little bigger with some graphcis and text, the setLocation() and setSize() methods don't work. the wierd part is that I don't get an error message, the compiler just ignores those lines...so it seems anyway.
    If anyone can help me I'd be very greatful
    thanx a lot

    Do you know there are 5 layout managers in java. It is probably worth looking through each one and the commands they use.
    The layout is determined by two things:
    1.position Components are added
    2.Layout manager used
    Ive never had to use setLocation() and setSize() as the layouts do it for you:
    1.Flowlayout: which is the default pane. e.g.
    setLayout(new Flowlayout()).
    2.GridLayout: postions panels into rows and columns
    b.GridBagLayout
    3.Borderlayout(NORTH,SOUTH,EAST,WEST and CENTER) postions in applet.
    4.CardLayout(a bit like a slideshow)
    5.Insets() which is used to determine top,bottom,left and right.
    Don't bother about 4 or 5 yet. But definitly have a look at the other 3.
    e.g. setLayout(new BorderLayout());
    add("North", new Button("ok"));
    add("CENTER", new Button("Exit");
    etc..

  • Need some urgent help with my (simple) Applet!

    Hello, I'm pretty new to Java and I am beginning to like it!
    I'm still verry much new to the language, but if you can help me you make me verry happy!
    Oke so I made an Applet where if you push on the button Omhoog, Omlaag, Links, Rechts, and Reset the ball (created with g.Oval in the methode paint) the ball should move above, down, left, right, and with reset it should go to the specified beginningpoint. The thing which I can't get to work is that when you push for instance on rechts(right) I want it to change in color for each specific movement (i.e left right...) and turn to black again when pushing on the reset button. I have been meshing around with if and else but I don't seem to know how to set this proparly. (I hope you can help me out!)
    this is my sourcecode:
    package oefening80;
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    public class Applet1 extends Applet {
    int xPos = 130, yPos = 130;
    Button Omhoog, Omlaag, Links, Rechts, Reset;
    boolean geklikt, gekliktL;
    public void init() {
    setBackground( Color.yellow );
    setLayout( null );
    geklikt = false;
    Omhoog = new Button( "Omhoog" );
    Omhoog.addActionListener( new OmhoogHandler() );
    Omhoog.setBounds( 120, 20, 50, 20 );
    gekliktL = false;
    Omlaag = new Button( "Omlaag" );
    Omlaag.addActionListener( new OmlaagHandler() );
    Omlaag.setBounds( 120, 60, 50, 20 );
    Reset = new Button( "Reset" );
    Reset.addActionListener( new ResetHandler() );
    Reset.setBounds( 120, 40, 50, 20);
    Links = new Button( "Links" );
    Links.addActionListener( new LinksHandler() );
    Links.setBounds(70, 40, 50, 20 );
    Rechts = new Button( "Rechts" );
    Rechts.addActionListener( new RechtsHandler() );
    Rechts.setBounds( 170, 40, 50, 20 );
    add( Omhoog );
    add( Omlaag );
    add( Reset );
    add( Links );
    add( Rechts );
    public void paint( Graphics g ) {
    g.fillOval( xPos, yPos, 30, 30 );
    class OmhoogHandler implements ActionListener {
    public void actionPerformed( ActionEvent e ) {
    yPos -= 10;
    repaint();
    class OmlaagHandler implements ActionListener {
    public void actionPerformed( ActionEvent e ) {
    gekliktL = true;
    yPos += 10;
    repaint();
    class ResetHandler implements ActionListener {
    public void actionPerformed( ActionEvent e ) {
    xPos = 130;
    yPos = 130;
    repaint();
    class LinksHandler implements ActionListener {
    public void actionPerformed( ActionEvent e ) {
    xPos -= 10;
    repaint();
    class RechtsHandler implements ActionListener {
    public void actionPerformed( ActionEvent e ) {
    xPos += 10;
    repaint();
    thanks.

    Gotten tag.
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    public class Applet1 extends Applet
         int     xPos = 130, yPos = 130;
         Button  Omhoog, Omlaag, Links, Rechts, Reset;
         boolean geklikt, gekliktL;
    public void init()
         setBackground( Color.yellow );
         setLayout( null );
         ActionListener actl = new OHandler();
         geklikt = false;
         Omhoog = new Button("Omhoog");
         Omhoog.addActionListener(actl);
         Omhoog.setBounds(115, 20, 60, 20 );
         gekliktL = false;
         Omlaag = new Button("Omlaag");
         Omlaag.addActionListener(actl);
         Omlaag.setBounds(115, 60, 60, 20 );
         Reset = new Button("Reset");
         Reset.addActionListener(actl);
         Reset.setBounds(120, 40, 50, 20);
         Links = new Button("Links");
         Links.addActionListener(actl);
         Links.setBounds(70, 40, 50, 20 );
         Rechts = new Button("Rechts");
         Rechts.addActionListener(actl);     
         Rechts.setBounds(170, 40, 50, 20 );
         add(Omhoog);
         add(Omlaag);
         add(Reset);
         add(Links);
         add(Rechts);
    public void paint(Graphics g)
         super.paint(g);
         g.fillOval(xPos, yPos, 30, 30 );
    class OHandler implements ActionListener
    public void actionPerformed(ActionEvent e)
         Object obj = e.getSource();
         if (obj.equals(Omhoog)) yPos -= 10;
         if (obj.equals(Omlaag)) yPos += 10;
         if (obj.equals(Rechts)) xPos += 10;
         if (obj.equals(Links))  xPos -= 10;
         if (obj.equals(Reset)) 
              xPos = 130;
              yPos = 130;
         repaint();
    [/code
    Noah                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Help with Deploy javaFx applet to the web, please

    I am new to JavaFx. I have a difficult time to deploy it to the web as an applet. Java console indicates that my jnlp file is not available. Here is what I have done:
    1. In the javaFx project (netbeans project), I put together a small application following the tutorial (app). Run as standard desktop app, it works fine. Run as applet, everything is ok except no images.
    2. In another web project (also netbeans project), I add the javaFx project generated app.jar to the web-inf/lib folder, modify the index.jsp to include a javaFx project generated app.html file and put it at the root of the web application. I also put the favaFx project generated app_browser.jnlp file in the same folder as index.jsp and app.html. Later on also in the web-inf/lib with app.jar. No matter where i put this app.jnlp file, I only see the spinning java logo. Java console states that jnlp is not available.
    this is in my index.jsp: <jsp:include page="app.html" />
    this is in my app.html:
    <h1>app</h1>
    <script src="http://dl.javafx.com/1.2/dtfx.js"></script>
    <script>
    javafx(
    archive: "app.jar",
    code: "com.app.Main",
    name: "app",
    width: 950,
    height: 600
    </script>
    this is in my app.jnlp
    <jnlp spec="1.0+" codebase="http://localhost:8080/app" href="app_browser.jnlp">>
    <information>
    <title>App</title>
    <vendor>Me</vendor>
    <homepage href="http://localhost:8080/app"/>
    <description>My App</description>
    <offline-allowed/>
    <shortcut>
    <desktop/>
    </shortcut>
    </information>
    <resources>
    <j2se version="1.5+"/>
    <extension name="JavaFX Runtime" href="http://dl.javafx.com/1.2/javafx-rt.jnlp"/>
    <jar href="WEB-INF/lib/app.jar" main="true"/>
    <jar href="WEB-INF/lib/commons-lang.jar"/>
    <jar href="WEB-INF/lib/commons-io.jar"/>
    </resources>
    <applet-desc name="app" main-class="com.sun.javafx.runtime.adapter.Applet" width="950" height="600">
    <param name="MainJavaFXScript" value="com.app.Main"/>
    </applet-desc>
    <update check="background">
    </jnlp>
    What did I miss here? Please help so that I can present this app to my boss and we can use javaFx to build our next application. Thank you very much.
    qding

    Welcome to the Sun forums.
    It would be worth checking the deployment launch file (JNLP) using JaNeLA *(<- link).* As the other poster mentioned, the file is invalid (OK - not well-formed, but possibly also invalid after that is fixed). Also, JaNeLA should warn you that the resources in WEB-INF are not accessible.
    Please do not repost(1) questions in future.
    (1) Post a question twice, or more.

  • Need help with paint() within applet

    Hi,
    I am having some problems in using the paint() method within an applet.
    I need to use drawString() in the paint() method.
    However, I discovered that when i used drawString() in paint() method.
    It clears the background which has other GUI components wipe out.
    Pls help, thanx
    Sample code:
    public class watever extends javax.swing.JApplet {
    //initialize some components and variables
    public void init() {
    //adding of components to contentPane
    public void paint(Graphics g) {
    g.drawString("The variable is " + sum, 80, 80);
    }

    super.paint(g) the paint method draws the components to, so if you override it and then never tell it to draw the components they don't get drawn.

  • Help with class in applet

    So im just starting java, about 12 weeks in.
    So in my class we are getting started with objects. What i want to do is create a class called car, and have it create a new car and draw images loaded, and then have the tires rotate, there are 2 images,
    the car base and the tires.
    I know how to display images in applets, but i dont know how to define the images in the objects class and then draw them from the class.

    I get errors with this code from my car class
    import java.applet.*;
    public class car extends Applet{
          * @param args
         private String model;
         private int passangers;
         private double gas,speed;
         private Image tire;
         private MediaTracker tr;
         tr = new MediaTracker(this);
         tire = getImage(getCodeBase(), "tire.png");
         tr.addImage(tire,0);
         public car(String id, int pass, double tank)
              model=id;
              passangers=pass;
              gas=tank;
         public car()
              model="";
              passangers=0;
              gas=0;
         }I get errors on these lines
         private Image tire;
         private MediaTracker tr;
         tr = new MediaTracker(this);
         tire = getImage(getCodeBase(), "tire.png");
         tr.addImage(tire,0);errors
    Severity and Description     Path     Resource     Location     Creation Time     Id
    Image cannot be resolved to a type     Car Game     car.java     line 13     1197077768237     1745
    MediaTracker cannot be resolved to a type     Car Game     car.java     line 14     1197077768238     1746
    Return type for the method is missing     Car Game     car.java     line 16     1197077768239     1750
    Syntax error on token ";", { expected after this token     Car Game     car.java     line 14     1197077768238     1747
    Syntax error on token "(", delete this token     Car Game     car.java     line 17     1197077768239     1752
    Syntax error on token "0", invalid FormalParameter     Car Game     car.java     line 17     1197077768239     1753
    Syntax error on token(s), misplaced construct(s)     Car Game     car.java     line 15     1197077768238     1748
    Syntax error on token(s), misplaced construct(s)     Car Game     car.java     line 16     1197077768239     1749
    Syntax error on tokens, delete these tokens     Car Game     car.java     line 16     1197077768239     1751
    The serializable class car does not declare a static final serialVersionUID field of type long     Car Game     car.java     line 4     1197077768237     1744
    The serializable class main does not declare a static final serialVersionUID field of type long     Applet     main.java     line 5     1196990860997     1682
    The serializable class main does not declare a static final serialVersionUID field of type long     Car Game     main.java     line 5     1197077768196     1743
    The serializable class ShowImage does not declare a static final serialVersionUID field of type long     Display JPEG/src     ShowImage.java     line 4     1196488911896     1393Edited by: jasonpeinko on Dec 7, 2007 5:42 PM

  • Need help with classes in Applets and drawing buildings.

    I'm trying to create an Applet that draws a starfield (I got that right) and then searches for any parameters in the Applet tag. The Applet then draws as many buldings as there are parameters in the Applet tag, and uses the number in the parameter as the height. I have it working OK, but it won't draw the buildings. Here is me code:
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.geom.*;
    import java.util.*;
    import javax.swing.*;
    public class Skyline extends Applet {
    public void init() {
    setBackground(Color.black);
    public void paint(Graphics g) {
    Graphics2D pen = (Graphics2D) g;
    Random generator = new Random();
    Stars starField = new Stars();
    starField.drawStars(pen, getWidth(), getHeight());
    int n = 1;
    String param = null;
    while((param = getParameter("param" + n)) != null) {
    n++;
    int startX = 0;
    int startY = getHeight();
    int height = 0;
    int width = getWidth() / (n + 2);
    Building structure = new Building();
    structure.drawBuilding(pen, height, width, startX, startY, n);
    class Stars {
    public void drawStars(Graphics2D pen, int Width, int Height) {
    Random generator = new Random();
    int runs = 1;
    while (runs <= 1000) {
    int Xcord = generator.nextInt(Width - 3);
    int Ycord = generator.nextInt(Height - 3);
    Ellipse2D.Double star
    = new Ellipse2D.Double(Xcord, Ycord, 3, 3);
    pen.setColor(Color.white);
    pen.fill(star);
    runs++;
    class Building {
    public void drawBuilding(Graphics2D pen, int height, int width, int startX, int startY, int n) {
    Random generator = new Random();
    int n2 = 1;
    int runs = 1;
    String input = "";
    int red = generator.nextInt(100),
    green = generator.nextInt(100),
    blue = generator.nextInt(100);
    pen.setColor(new Color(red, green, blue));
    while (runs <= n) {
    input = getParameter("building" + n2);
    height = Integer.parseInt(input);
    height = startY - height;
    Rectangle building = new Rectangle(startX, startY, height, width);
    pen.fill(building);
    startY = startY + width;
    n2++;
    runs++;
    Can anyone help me?

    That didn't work, so I looked at the code again and found some errors. I decided to rewrite it, here is the updated code...
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.geom.*;
    import java.util.*;
    import javax.swing.*;
    public class Skyline extends Applet {
    public void init() {
    setBackground(Color.black);
    public void paint(Graphics g) {
    Graphics2D pen = (Graphics2D) g;
    Random generator = new Random();
    Stars starField = new Stars();
    starField.drawStars(pen, getWidth(), getHeight());
    Building structure = new Building();
    structure.drawBuilding(pen);
    class Stars {
    public void drawStars(Graphics2D pen, int Width, int Height) {
    Random generator = new Random();
    int runs = 1;
    while (runs <= 1000) {
    int Xcord = generator.nextInt(Width - 3);
    int Ycord = generator.nextInt(Height - 3);
    Ellipse2D.Double star
    = new Ellipse2D.Double(Xcord, Ycord, 3, 3);
    pen.setColor(Color.white);
    pen.fill(star);
    runs++;
    class Building {
    public void drawBuilding(Graphics2D pen) {
    Random generator = new Random();
    int n = 1;
    int n2 = 1;
    int runs = 1;
    String input = "";
    String param = "";
    while ((param = getParameter("building" + n)) != null) {
    n++;
    int height = getHeight();
    int width = getWidth();
    int startX = 0;
    int startY = height;
    int red = generator.nextInt(100),
    green = generator.nextInt(100),
    blue = generator.nextInt(100);
    pen.setColor(new Color(red, green, blue));
    while (runs <= n) {
    height = getHeight();
    input = getParameter("building" + n2);
    height = Integer.parseInt(input);
    height = startY - height;
    Rectangle building = new Rectangle(startY, startX, height, width);
    pen.fill(building);
    startX = startX + width;
    n2++;
    runs++;
    I can get it to draw one large black building, but that's it.

  • Help with publish an applet on the web

    I have a few java programs I would like to share with family and friends. I recently learned to convert my applications to Applets, now I am looking to post these on my blog. I know how to embed the applet into an html, and did successfully in my PC. However, when trying to do the same online, I run into problems:
    -Cannot find a server where to upload the applet. Google doesn't seem to do it, and I tried some others without luck.
    -I upload the .class files of my applet to box.net, and copy the URL. In the html of my blog, I use the <applet code = "someURL", but the applet fails since it is unable to find any other class.
    I know that applets are common throughout the web, and that it should be within the reach of an individual programmer like myself (with no budget). If someone who has published an applet could give a short summary of the process, I would much appreciate.
    Specifically, I am looking for:
    Which file hosting service did you use?
    Did you upload as a jar file, or the .class files individually as I did?
    Did you have to pay for the service?
    Thank you

    >
    I have a few java programs I would like to share with family and friends. >Perhaps launching the programs using [Java Web Start|http://java.sun.com/javase/technologies/desktop/javawebstart/index.jsp] (JWS) will fulfil the requirement. A launch using JWS is generally simpler than embedding an applet in HTML. (Note that JWS can launch both (J)Frame and (J)Applet based apps., though a frame works/looks slightly better).
    JWS can launch apps., from a link in a web page..
    As an aside. If you do not intend to use JWS please state that, and explain why.  This is much easier to explain for JWS launch.
    >
    ..I recently learned to convert my applications to Applets, now I am looking to post these on my blog. I know how to embed the applet into an html, and did successfully in my PC. However, when trying to do the same online, I run into problems:
    -Cannot find a server where to upload the applet. Google doesn't seem to do it, and I tried some others without luck.>Google can certainly host JWS apps., check out some of the examples [by Dr John Matthews|http://sites.google.com/site/drjohnbmatthews/], one example of note is the [alpha-composite demo|http://sites.google.com/site/drjohnbmatthews/composite].
    OTOH, I do not know if his site is 'free' or 'paid'. Perhaps Google's free sites limit what you can upload.
    >
    -I upload the .class files of my applet to box.net, and copy the URL. In the html of my blog, I use the <applet code = "someURL", but the applet fails since it is unable to find any other class. >..hmm. Very insufficient detail there. What speaks volumes instead is if you link to the broken applet page.
    But I will comment this. The code attribute should not be any URL. It should be the 'fully qualified class name'. If the applet is trying to get classes from another site, it would do that by specifying a codebase.
    >
    I know that applets are common throughout the web, and that it should be within the reach of an individual programmer like myself (with no budget). If someone who has published an applet could give a short summary of the process, I would much appreciate.>If you can find a place to host the applet itself, but want the HTML elsewhere, try this experiment..
    I have a demo applet at my site, explained/linked in [http://pscode.org/test/docload/|http://pscode.org/test/docload/]. It uses the applet at [http://pscode.org/test/docload/docload.jar|http://pscode.org/test/docload/docload.jar]. The test is to try and load that applet at your site.
    So try this in your HTML.
    <APPLET
      CODE="org.pscode.eg.docload.DocumentLoader"
      ARCHIVE="docload.jar"
      CODEBASE="http://pscode.org/test/docload/"
      WIDTH="600"
      HEIGHT="500"
      ALT="<P>This applet requires Java to be enabled!  Check the browser options or see your SysAdmin.">
    <P>This page requires Java!  Get it free from <A HREF='http://www.java.com/'>www.java.com</A>.</P>
    </APPLET>(That is actually the copy/pasted applet element from the applet page at my site, but with the codebase changed.)
    >
    Did you upload as a jar file, or the .class files individually as I did?>Rarely I use loose class files with applets, but it can be a hassle if they are in packages. It might be that cross-site access requires archives, but JWS certainly requires archives.

  • Help with converting an applet into an application

    Here is a set of code which can work perfectly fine as an applet. But I have problem converting it into an application. Any help? I get some null pointer exception. Thanks alot.
    //File Name: Radar.java
    //Author: Saad Ayub
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    class Flash extends Thread{
    private DrawA dA;
    private int x;
    private int xCor[];
    private int yCor[];
    private int i;
    private int dir;
    private Image im;
    private Graphics buff;
    public Flash(DrawA dA, Image im, Graphics buff){
    this.dA = dA;
    this.im = im;
    this.buff = buff;
    xCor = new int[451];
    yCor = new int[451];
    dir = 10;
    }//end of Flash constructor
    public void run(){
    for(x = 75, i = 0; x <= 525; x++, i++){
    xCor[i] = x - 300;
    for(i = 0; i <= 450; i++){
    yCor[i] = (int)Math.sqrt(62500 - (xCor[i] * xCor));
    yCor[i] = 300 - yCor[i];
    for(x = 0; x <= 450; x++){
    xCor[x]+=300;
    i = 0;
    while(true){
    try{
    Thread.sleep(35);
    catch(Exception e){}
    dA.repaint();
    i += dir;
    if(i < 0 || i > 450){
    dir = -dir;
    i += dir;
    }//end of if
    }//end of while
    }//end of run
    public void draw(Graphics g){
    int green = 255;
    buff.setColor(Color.black);
    buff.fillRect(0, 0, 600, 330);
    buff.setColor(new Color(0, 70, 0));
    buff.fillArc(50, 50, 500, 500, 25, 130);
    buff.setColor(Color.green);
    if(i > 450)
    return;
    if(xCor[i] != 0 && yCor[i] != 0)
    buff.drawLine(xCor[i], yCor[i], 300, 300);
    if(dir > 0){
    for(int j = i; j > (i - 100); j--){
    if(j >= 0 && j <= 450){
    green -= 2;
    buff.setColor(new Color(0, green, 0));
    buff.drawLine(xCor[j], yCor[j], 300, 300);
    }//end of if
    }//end of for
    }//end of if
    else{
    for(int j = i; j < (i + 100); j++){
    if(j >= 0 && j <= 450){
    green -= 2;
    buff.setColor(new Color(0, green, 0));
    buff.drawLine(xCor[j], yCor[j], 300, 300);
    }// end of if
    }//end of for
    }//end of else
    buff.setColor(Color.green);
    buff.drawArc(112, 112, 375, 375, 25, 130);
    buff.drawArc(174, 174, 250, 250, 25, 130);
    buff.drawArc(238, 238, 125, 125, 25, 130);
    buff.drawLine(300, 300, 300, 50);
    g.drawImage(im, 0, 0, null);
    }//end of draw
    }//end of flash class
    class DrawA extends Panel{
    private Flash fl;
    private Image im;
    private Graphics buff;
    public DrawA(Image im){
    this.im = im;
    buff = im.getGraphics();
    fl = new Flash(this, im, buff);
    fl.start();
    // setBackground(Color.black);
    public void paint(Graphics g){
    fl.draw(g);
    public void update(Graphics g){
    paint(g);
    public class Radar extends Applet{
    public DrawA dA;
    private JLabel display;
    public Radar()
    display = new JLabel("display");
    public void init(){
    dA = new DrawA(createImage(600, 330));
    setLayout(new BorderLayout());
    add(dA, BorderLayout.CENTER);
    add(display, BorderLayout.EAST);
    public void stop(){
    destroy();
    Edited by: bozovilla on Oct 20, 2008 8:32 AM

    Start out by letting this thread die out...
    and repost saying that you forgot to use code tags and describe sufficiently what your problem is--things like the actual error message and where it happens.

  • Need Emergancy help with new upt

    Hi I just updated my sound cards drivers I have the Sound Blaster Audigy 2 ZS.
    Now I am all screwed up. I updated everything like I did before from the update page, now I no longer can find my taskbar icon for volume, cannot find EAX cannot find Equalizer for the media player everything is all screwed up. I tried to revert back to my ariganal drivers from the CD that came with it. And when I install it I now get a error msg saying error loading language something? and it had to do with the volume controll. I am not so computer savy but I have not had this happen before.
    I downloaded all availabe updated drivers and software from the download page, I did everything the way I always done, and now Im lost.
    Can someone help me please. I am sure you will want more info so please be patient I am new to all this.
    Thank you
    Danny
    HP Presario SR 30 NX (PC)
    60 GIG HD- AMD Athlon XP 3000+
    2.0 GHz Ram
    Sound Blaster Audigy 2 ZS
    Nvidia GeForce FX 5700 VE 256 MB DDR

    I've gone through all Updates again, and still nothing :-/
    yet again the iPad and iPhone are actually charging on the iPega Dock,
    i've plugged the iPega USB straight into the iMac USB Port
    (where as before I used an extension) but still nothing,
    they're charging but iTunes and iPhoto etc just aint detecting them,
    is there anything else on the iMac itself that needs to be turned on or anything?
    and again with the PRAM Reset, I kept my fingers on the Option, Command, R and P but there was 1 chime and then a box saying about resetting and backing up and so on....

  • Need help with a Java applet

    newGame.setActionCommand("newgame:1");
    newGame2.setActionCommand("newgame:2");
    //other lines of code in a previous method, rest of code not shown
    public void actionPerformed(ActionEvent evnt)
    int i;
    int j;
    String sp = new String(":");
    String[] cmd = evnt.getActionCommand().split(sp);
    // rest of code not shown
    // **When I get to that lastline, it tells me that the split() method could not be found in class String.  If you would like to see the rest of my code in order to help me, I will post anything to figure out what this problem is.*//

    "because(sic)" was supposed to be "became" ... anyway, in the API doco, when it says that something is "since 1.4", for example, it means from that point onward. So 1.5.x is good - but I wanted to warn you off v.1.3.x in case that was where you were running this.

Maybe you are looking for

  • Viewing photos from EXT drive in iPhoto, please help!

    Is there any way to view my photos in iPhoto if I store some of them on an external drive (without having to copy them into the iPhoto library on the internal drive)? There's a lot more room on my external drives and my computer is full; this would s

  • Fieldpoint FP-RLY-422 does not change status

    I am using Measurement Automation to run field point 4.1. I have 2 FP-RLY-422 in the field bank in one of the 422 at address 7 channel 1 the value on the screen shows as 1 if I write a 0 the relays goes on and stays that way until I do a reset. I can

  • Starting sql agent manually - operating rules

    Hi We run std 2008 r2.  Today after overriding the 1st step's behavior in a sql agent job to end and report success after completing successfully, I 1) rt clicked "start at step..." (saw the turning green arrow on rt pop up immediately)  2) highlight

  • Having trouble attaching PDF to aol email

    Recently started having trouble attaching a PDF to an aol email on my mac.  The document implants in the body of the email vs. As an attachment.

  • Can't get books to open in Kindle on iPhone4.

    !) My Kindle app has already been updated before the latest Apple Update 2) I did not have this problem last night. 3) As of this morning, I can open the Kindle app on my iPhone 4 but when I go to open a book it closes. Suggestions? Not sure if this