Help with refreshing applet

If I recompile my applet and try to restart it in Netscape the changes do not take hold. I've tried refreshing and emptying the cache and even setting the cache to 0, but it won't run the new version of the program. The only way I can get it to work is to quit Netscape entirely, restart it, and start the Java program again. Why is this? And is there a way to get around this?
And there is a a second related problem I have. My applet calls a CGI program and recieves html text in reply. This HTML text I display in a JEditorPane. The first time I run the program it displays it nicely, but everytime after that it displays the HTML commands mixed in with the text, i.e. "<TABLE><TR><TD>text" instead of a table.
Does anyone know what causes this or how to prevent it?

Thanks for the help again. I read the API myself and tried adding the new line, but it had no affect. I tried this:
ResultsDisplay.getEditorKit().createDefaultDocument();
ResultsDisplay.setContentType("text/html");               
ResultsDisplay.setText(inputStore.toString());and even this:
ResultsDisplay = new javax.swing.JEditorPane();
ResultsDisplay.getEditorKit().createDefaultDocument();
ResultsDisplay.setContentType("text/html");
ResultsDisplay.setText(inputStore.toString());But neither solution fixed it.

Similar Messages

  • Need help with advanced applet

    I need help with designing an applet as follows. Can someone give me a basic layout of code and material so i can fill in the rest or at leats give me some hints so i can get started since i am like no good at applets.
    Design and implement an applet that graphically displays the processing
    of a selection sort. Use bars of various heights to represent
    the values being sorted. Display the set of bars after each swap. Put
    a delay in the processing of the sort to give the human observer a
    chance to see how the order of the values changes.
    heres a website that does something similar
    http://www.cs.ubc.ca/spider/harrison/Java/sorting-demo.html

    elasolova wrote:
    i will not help you this time. but if you buy me a candy maybe i can reconsider the issue. :PI suggest an all-day sucker.

  • Plz help with deploying applet that uses SSL

    Hi, maybe this is not the adecuate forum but ive already tried in others and i got no answer.
    Im trying to use a certificate with my applet ( tha sends a lot of info to the server and also connects to another hibernate db) but im getting this error:
    Server side:
    username is: Panda
    Registered the SSLServerSocket on port 6969
    Listening ....
    ---- Got a connection from a client
         this is an unknown client
    !!!!!!Error in reading or writing from/to the client:
    javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.checkEOF(Unknown Source)
         at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
         at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(Unknown Source)
         at sun.nio.cs.StreamDecoder$CharsetSD.implRead(Unknown Source)
         at sun.nio.cs.StreamDecoder.read(Unknown Source)
         at java.io.InputStreamReader.read(Unknown Source)
         at java.io.BufferedReader.fill(Unknown Source)
         at java.io.BufferedReader.readLine(Unknown Source)
         at java.io.BufferedReader.readLine(Unknown Source)
         at PaqueteServidor.Server$handleRequest.run(Server.java:130)
    Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
         at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.getSession(Unknown Source)
         at PaqueteServidor.Server.printClientCerts(Server.java:47)
         at PaqueteServidor.Server.run(Server.java:100)
    javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.checkEOF(Unknown Source)
         at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
         at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(Unknown Source)
         at sun.nio.cs.StreamDecoder$CharsetSD.implRead(Unknown Source)
         at sun.nio.cs.StreamDecoder.read(Unknown Source)
         at java.io.InputStreamReader.read(Unknown Source)
         at java.io.BufferedReader.fill(Unknown Source)
         at java.io.BufferedReader.readLine(Unknown Source)
         at java.io.BufferedReader.readLine(Unknown Source)
         at PaqueteServidor.Server$handleRequest.run(Server.java:130)
    Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
         at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.getSession(Unknown Source)
         at PaqueteServidor.Server.printClientCerts(Server.java:47)
         at PaqueteServidor.Server.run(Server.java:100)
    Client side:
    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
         at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
         at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
         at Interfaz.InterfazMovil.init(InterfazMovil.java:89)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
         at sun.security.validator.PKIXValidator.doBuild(Unknown Source)
         at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
         at sun.security.validator.Validator.validate(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
         at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(Unknown Source)
         ... 14 more
    Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
         at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
         at java.security.cert.CertPathBuilder.build(Unknown Source)
         ... 19 more
    19:40:34,444 INFO Environment:464 - Hibernate 3.0.5
    19:40:34,444 INFO Environment:477 - hibernate.properties not found
    19:40:34,444 INFO Environment:510 - using CGLIB reflection optimizer
    19:40:34,454 INFO Environment:540 - using JDK 1.4 java.sql.Timestamp handling
    19:40:34,645 INFO Configuration:1110 - configuring from resource: /bd/hibernate/hibernate.cfg.xml
    19:40:34,645 INFO Configuration:1081 - Configuration resource: /bd/hibernate/hibernate.cfg.xml
    19:40:35,045 ERROR XMLHelper:59 - Error parsing XML: /bd/hibernate/hibernate.cfg.xml(21) The content of elements must consist of well-formed character data or markup.
    19:40:35,045 ERROR Configuration:1172 - problem parsing configuration/bd/hibernate/hibernate.cfg.xml
    org.dom4j.DocumentException: Error on line 21 of document : The content of elements must consist of well-formed character data or markup. Nested exception: The content of elements must consist of well-formed character data or markup.
         at org.dom4j.io.SAXReader.read(SAXReader.java:482)
         at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1168)
         at org.hibernate.cfg.Configuration.configure(Configuration.java:1112)
         at bd.hibernate.HibernateUtil.currentSession(HibernateUtil.java:51)
         at bd.controlador.CLetrero.ListarLetreros(CLetrero.java:45)
         at Interfaz.InterfazMovil.init(InterfazMovil.java:126)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Nested exception:
    org.xml.sax.SAXParseException: The content of elements must consist of well-formed character data or markup.
         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
         at org.dom4j.io.SAXReader.read(SAXReader.java:465)
         at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1168)
         at org.hibernate.cfg.Configuration.configure(Configuration.java:1112)
         at bd.hibernate.HibernateUtil.currentSession(HibernateUtil.java:51)
         at bd.controlador.CLetrero.ListarLetreros(CLetrero.java:45)
         at Interfaz.InterfazMovil.init(InterfazMovil.java:126)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    %%%% Error Creating SessionFactory %%%%
    org.hibernate.HibernateException: problem parsing configuration/bd/hibernate/hibernate.cfg.xml
         at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1173)
         at org.hibernate.cfg.Configuration.configure(Configuration.java:1112)
         at bd.hibernate.HibernateUtil.currentSession(HibernateUtil.java:51)
         at bd.controlador.CLetrero.ListarLetreros(CLetrero.java:45)
         at Interfaz.InterfazMovil.init(InterfazMovil.java:126)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: org.dom4j.DocumentException: Error on line 21 of document : The content of elements must consist of well-formed character data or markup. Nested exception: The content of elements must consist of well-formed character data or markup.
         at org.dom4j.io.SAXReader.read(SAXReader.java:482)
         at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1168)
         ... 6 more
    java.lang.NullPointerException
         at bd.hibernate.HibernateUtil.currentSession(HibernateUtil.java:59)
         at bd.controlador.CLetrero.ListarLetreros(CLetrero.java:45)
         at Interfaz.InterfazMovil.init(InterfazMovil.java:126)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Plz help and thx in advance.

    I know I didn't get round to replying but no need to post it so many times.
    http://forum.java.sun.com/thread.jspa?threadID=666870
    http://forum.java.sun.com/profile.jspa?userID=543817
    http://forum.java.sun.com/thread.jspa?threadID=669965
    http://forum.java.sun.com/profile.jspa?userID=543817
    http://forum.java.sun.com/thread.jspa?threadID=669975
    http://forum.java.sun.com/thread.jspa?threadID=669973
    Could it be that the server and client need to open different keystores?
    http://forums.java.sun.com/thread.jspa?threadID=573918&messageID=3272683
    reply 7
    My example given before should work on different machines, try to export the server key and import it into the
    client keystore. Export the client key and import in the server keystore if you want the server to authenticate
    the client.
    http://forum.java.sun.com/thread.jspa?threadID=666870
    reply 4
    Check the method getSSLSocketFactory in the applet, that will open a keystore for you.

  • Help with java applets

    Ok i know i haven't read the applet tutorial or had much experience with applets but just hear me out and see if you can help me.
    BACKGROUND
    Ok...so i have previously viewed an applet on windows viewing an html file on my computer. I am trying to view just the most simple applet (helloworld) on linux. I'm using Ubuntu linux, the latest version as of February 23, 2006.I created an applet file and an html file in the same directory with the html file having an <applet> tag in it linking to the HelloWorldApp. I have tried viewing the html file and the java applet won't load. Everything other than the applet worked and I'm just stuck.
    So my plea is would somebody please just paste the bare minimum html file and applet file that you can see an applet with? I want to learn about applets and will do the tutorial but I would really like to just see one.
    Please help,
    A frustrated applet noob
    p.s.
    According to java.com I have installed JRE 5.0 and i have compiled a java application so I'm pretty sure I have successfully installed JDK 5.0.

    Bob, what web browser are you using?
    Make sure that the browser supports Java applets.
    If you want just to debug your applet try appletviewer utility
    from JDK first.

  • Help with simple applet - dragging box

    Hi I need help with a simple applet concept.
    I have a picture drawn in the background, but I need to draw a square and resize it when I drag.
    So with the picture in the background I click, drag the mouse, and it draws a rectangle from the starting point to where the mouse is while the mouse is clicked.
    The only problem is I can't figure out how to do this without redrawing the whole picture. If I don't repaint, it just keeps stretching around rectangles and leaving them there.
    I don't really need exact code, just an idea on how to do this without repainting the background every time the mouse is moved (because the picture in the background is complicated to draw and takes like a second).
    Thanks
    [nvm, found out about xormode]
    Edited by: BugMenOTdhzj on Nov 30, 2009 4:47 PM

    BugMenOTdhzj wrote:
    ..the picture in the background is complicated to draw and takes like a second).Paint the 'picture in the background' to a BufferedImage, then when it comes to paint()/paintComponent(), draw the BI to the Graphics object (clipped, if necessary (1)), then draw the rectangle to the Graphics object. This would be further optimised at time of rendering, by drawing both the 'picture in the background' BI and rectangle to a second BI, and finally writing that 2nd BI to the Graphics object.
    1) There are potentially other improvements that can be made, particularly with clipping, but I suspect if you try as I suggested, the rendering will be very quick and responsive. I have 40 FPS sound trace animations that do a great deal more on each call to paintComponent(), before bursting the final BI to screen.

  • Need help with refreshing open window in new tab

    Hello all,
    First, all my other problems I've solved.  One last thing, being a newbie and trying things I've found on the net and them
    not working, I can use your help one last time.  My code has a Home page that peforms a Search (most of you have
    I am sure done this), and from that search submit a window opens in a new tab (browser tab) and has the results on
    it.
    That works fine.  What I'm having trouble with is being able to perform a new search and refreshing that open window
    with the new data.  Right now I am closing that window by clicking on the tab and then performing the search.
    While it works, it's not user friendly.
    So, I've tried the usual  mywindow=window.open("url.cfm"); and then trying to grab that handle to refresh, but to
    no avail.  Has anyone done this?
    Thanks!

    Here's an example of how you could do it.
    <script>
    function submitAndFocusTarget(form) {
      var win = window.open("", form.target);
      form.submit();
      win.focus();
    </script>
    <form action="index.cfm" target="mysearchwin" method="get" onsubmit="submitAndFocusTarget(this); return false;">
      <input type="text" name="search" value="" />
      <input type="submit" value="search" />
    </form>

  • Need help with Java applet, might need NetBeans URL

    I posted the below question. It was never answered, only I was told to post to the NetBeans help forum. Yet I don't see any such forum on this site. Can someone tell me where the NetBeans help forum is located (URL).
    Here is my original question:
    I have some Java source code from a book that I want to compile. The name of the file is HashTest.java. In order to compile and run this Java program I created a project in the NetBeans IDE named javaapplication16, and I created a class named HashTest. Once the project was created, I cut and pasted the below source code into my java file that was default created for HashTest.java.
    Now I can compile and build the project with no errors, but when I try and run it, I get a dialog box that says the following below (Ignore the [...])
    [..................Dialog Box......................................]
    Hash Test class wasn't found in JavaApplication16 project
    Select the main class:
    <No main classes found>
    [..................Dialog Box......................................]
    Does anyone know what the problem is here? Why won't the project run?
    // Here is the source code: *****************************************************************************************************
    import java.applet.*;
    import java.awt.*;
    import java.awt.geom.*;
    import java.awt.event.*;
    import java.util.*;
    public class HashTest extends Applet implements ItemListener
    // public static void main(String[] args) {
    // Hashtable to add tile images
    private Hashtable imageTable;
    // a Choice of the various tile images
    private Choice selections;
    // assume tiles will have the same width and height; this represents
    // both a tile's width and height
    private int imageSize;
    // filename description of our images
    private final String[] filenames = { "cement.gif", "dirt.gif", "grass.gif",
    "pebbles.gif", "stone.gif", "water.gif" };
    // initializes the Applet
    public void init()
    int n = filenames.length;
    // create a new Hashtable with n members
    imageTable = new Hashtable(n);
    // create the Choice
    selections = new Choice();
    // create a Panel to add our choice at the bottom of the window
    Panel p = new Panel();
    p.add(selections, BorderLayout.SOUTH);
    p.setBackground(Color.RED);
    // add the Choice to the applet and register the ItemListener
    setLayout(new BorderLayout());
    add(p, BorderLayout.SOUTH);
    selections.addItemListener(this);
    // allocate memory for the images and load 'em in
    for(int i = 0; i < n; i++)
    Image img = getImage(getCodeBase(), filenames);
    while(img.getWidth(this) < 0);
    // add the image to the Hashtable and the Choice
    imageTable.put(filenames[i], img);
    selections.add(filenames[i]);
    // set the imageSize field
    if(i == 0)
    imageSize = img.getWidth(this);
    } // init
    // tiles the currently selected tile image within the Applet
    public void paint(Graphics g)
    // cast the sent Graphics context to get a usable Graphics2D object
    Graphics2D g2d = (Graphics2D)g;
    // save the Applet's width and height
    int width = getSize().width;
    int height = getSize().height;
    // create an AffineTransform to place tile images
    AffineTransform at = new AffineTransform();
    // get the currently selected tile image
    Image currImage = (Image)imageTable.get(selections.getSelectedItem());
    // tile the image throughout the Applet
    int y = 0;
    while(y < height)
    int x = 0;
    while(x < width)
    at.setToTranslation(x, y);
    // draw the image
    g2d.drawImage(currImage, at, this);
    x += imageSize;
    y += imageSize;
    } // paint
    // called when the tile image Choice is changed
    public void itemStateChanged(ItemEvent e)
    // our drop box has changed-- redraw the scene
    repaint();
    } // HashTest

    BigDaddyLoveHandles wrote:
    h1. {color:red}MULTIPOST: [http://forums.sun.com/thread.jspa?threadID=5358840&messageID=10564025]{color}
    That wasn't attention-grabbing enough apparantly. Let's try it again.
    h1. {color:red}MULTIPOST: [http://forums.sun.com/thread.jspa?threadID=5358840&messageID=10564025]{color}
    h1. {color:red}MULTIPOST: [http://forums.sun.com/thread.jspa?threadID=5358840&messageID=10564025]{color}
    h1. {color:red}MULTIPOST: [http://forums.sun.com/thread.jspa?threadID=5358840&messageID=10564025]{color}
    h1. {color:red}MULTIPOST: [http://forums.sun.com/thread.jspa?threadID=5358840&messageID=10564025]{color}
    h1. {color:red}MULTIPOST: [http://forums.sun.com/thread.jspa?threadID=5358840&messageID=10564025]{color}

  • HELP with reloading applet AFTER it displays image

    Hi people
    I got a webpage that loads an applet which constantly needs to be refreshed in order for the applet to display a newer version of an image file (not very efficient I know). The image file is being constantly updated and so I need a way of refreshing the applet only AFTER it has been completely been loaded and is displaying the image?
    I thought that
    for(;;)
      Thread.sleep(3000);
      getAppletContext().showDocument(url);
    }might do it but all it seems to do is refresh the page before anything is displayed
    Any ideas?

    If I put this problem in another way then it might help you KIND bunch to help me out.
    My remote desktop application has only 1 little problem left. It displays the 1st image using the method below:
    public void scrn()
      try
        fileSize = dis.readInt();
        fileInBuffer = new byte[fileSize];
        dis.readFully(fileInBuffer, 0, fileSize-1);
        //Create an image from the byte array
        img = Toolkit.getDefaultToolkit().createImage(fileInBuffer);
        //Create a Canvas object and add the canvas to the applet
        canvas = new IRDPCanvas(img, this);
        canvas.addMouseListener(this);
        canvas.addKeyListener(this);
        add(canvas);
      catch (Exception ioe)
    }where dis = dataInputStream
    IRDPCanvas has the following method
    public void paint(Graphics g)
      System.out.println("in paint");
      if(image != null)
        if(tracker.checkAll(true))
          if(tracker.isErrorAny())
            System.out.println("Can't load image");
          cont.validate();
      g.drawImage(image, 0, 0, this);
    }where Container = cont
    My problem is that applet displays the first image and then stops. If I rrefresh the page then the applet would display the next image and stop. This means that I have to constantly hit refresh in order for it to display the next image after the current one. Is there a better way of doing this?
    I really need help here. PLEASE HELP.

  • Help with an applet

    How can I make to refresh the HTML page where I have the applet when I press a button?
    Thanks.

    <form name="myForm" action="Current_Applet_Name" method="Post">
    <input type=submit name="myButton" value="Refresh">
    </form>
    If your button is in the form as shown above and the form action is the Applet you want to refresh, then when you click on the button it will submit your form which will refresh the HTML page that has your Applet.
    Hope this helps!!
    Taji

  • Need help with an applet that will only run as an application

    I am working on a slide show applet. The problem is that is won't run as an applet. I added a quite standard main method to stick the applet in a JFrame and this worked. I believe that the problem lies in how I am trying to open the files.
    here are two of the methods that I believe contain part of the problem
         private void showImage( String image_name )
              image_file = Toolkit.getDefaultToolkit().getImage( image_name );
              display_image.loadImage( image_file );
              repaint();
         private void setFileFolder( String folder )
              file_finder = new File( folder );
              file_results = file_finder.list();
         }image_file is an object of class Image, display_image is an object of class ImageComponent (extends JComponent to draw an image), and file_finder and file_results are both objects of class File
    I would greatly appreciate it if some one would help me with this.
    The full source can be found at http://www.geocities.com/enchantedforest/3688/ImSP.zip

    Ok. I got the image loading to work.
    Now how do I fix the second method shown in my first post? It is needed to find all of the images in one specific folder so that the slide show can run.

  • Need help with Drawing applet

    im in the process of making a network whiteboard as a project for college and i was wondering if anyone could help me with a problem im having. When my application minimises or a window is placed over the application the drawing is erased, even if a window is placed over a certain part of the application it erases the part it covers is there any way to stop this from happening i cant seem to fix it, any help is appreciated, thanks

    You should be buffering what the whiteboard is to draw, either as a BufferedImage or in some
    data structure so that you can refresh when asked to repaint. Are you doing that, or are you
    just drawing new graphics as it arrives from the server?

  • Help with simple applet code

    i wanted to write a applet that would display a image,(this is my first program) i wrote the code shown below,but image space is emptly when i load it up with any browser.....i ran the code in netbeans,,, i am a novice, any piece of advice also wud be helpful.........
    <applet code="imagereadingapplet" width=500 height=500>
    <param name="img" value="kollam.gif">
    </applet>
    import java.applet.*;
    import java.awt.*;
    * @author raman
    public class imagereadingapplet extends Applet {
    * Initialization method that will be called after the applet is loaded
    * into the browser.
    Image img;
    @Override
    public void init() {
    img = getImage(getDocumentBase(),"kollam.gif");
    @Override
    public void paint(Graphics g){
    g.drawImage(img,0,0,this);
    // TODO overwrite start(), stop() and destroy() methods
    }

    Hi,
    First advice imagereadingapplet -> ImageReadingApplet (Java name convention).
    Second image file name is hard coded so you don't have to set param for the applet (Best would be not to hard code this name).
    Finally maybe the most interesting, It seems that image kollam.gif is not at root folder.
    I don't really know netbeans but your image must be in bin folder, the same as imagereadingapplet.class.

  • Help with Refreshing and Calling Screens

    Hi everyone.  I have somewhat of a simple ABAP program in which the user will enter data on Selection-Screen 1000.  This will then be loaded into an Object Oriented ALV Grid for display purposes only (screen 0100).  At any time, the user may use the back button on the ALV Grid Screen; which will take them from screen 0100 to screen 1000(Selection Screen).  Lets assume the user does not want to go back to the original selection screen from the ALV Grid Screen; they entered the information correctly and want to continue processing using a custom button I've created which will continue to process the record of data into a BW ODS.  This process works, but now I would like to use the write statement once the custom button is clicked to show a summary of the data I am inserting into the ODS after the data has been inserted.  The problem is, the title of the ALV Grid still shows and the Write statement is processed, but not shown on the screen.  I've been trying to refresh the screen with set screen and call screen combinations, but no luck.  Any Help would be appreciated.  Thanks!
    Here is a sample of the code below:
    *& Report  ZINC_DSP_SALES_INCRASE
    REPORT  ZINC_DSP_SALES_INCREASE MESSAGE-ID zsm.
    INCLUDE <icon>.
    DATA: credit_itab type standard table of /bic/azincosvi00,
          wa_credit like line of credit_itab,
          alv_itab type standard table of /bic/azincosvi00,
          wa_alv like line of alv_itab.
    DATA: ok_code LIKE sy-ucomm,
          save_ok LIKE sy-ucomm,
          incent type table of /bic/azincosvi00,
          g_container TYPE scrfname VALUE 'Increase DSP Sales',
          grid1 TYPE REF TO cl_gui_alv_grid,
          gs_layout TYPE lvc_s_layo,
          g_custom_container TYPE REF TO cl_gui_docking_container.
    DATA: active_guid like /bic/mzguid_dsr,
          UNIQUEKEY LIKE /BIC/AZINCOSVI00-/BIC/ZRCRDKEY,
          rpt_per_rec like  /BIC/MZRPTPRDCR,
          dsrcode like /bic/mzdsrcode-/bic/zdsrcode,
          payrec like /bic/mzsubcode.
    CLASS lcl_event_receiver DEFINITION DEFERRED.
    CLASS lcl_event_receiver DEFINITION.
      PUBLIC SECTION.
        METHODS:
        handle_toolbar
            FOR EVENT toolbar OF cl_gui_alv_grid
                IMPORTING e_object e_interactive,
        handle_user_command
            FOR EVENT user_command OF cl_gui_alv_grid
                IMPORTING e_ucomm.
        PRIVATE SECTION.
    ENDCLASS.
    CLASS lcl_event_receiver IMPLEMENTATION.
    This will create the toolbar
      METHOD handle_toolbar.
       DATA: ls_toolbar  TYPE stb_button.
       CLEAR ls_toolbar.
       MOVE 3 TO ls_toolbar-butn_type.
       APPEND ls_toolbar TO e_object->mt_toolbar.
    append an icon to show booking table
       CLEAR ls_toolbar.
       MOVE 'CREATE' TO ls_toolbar-function.
       MOVE ICON_OKAY TO ls_toolbar-icon.
       MOVE ' ' TO ls_toolbar-disabled.
       APPEND ls_toolbar TO e_object->mt_toolbar.
      ENDMETHOD.
    METHOD handle_user_command.
      CASE e_ucomm.
      WHEN 'CREATE'.
      Insert /bic/azincosvi00 from wa_credit.
      CALL METHOD grid1->free.
      SET SCREEN '200'.
      WHEN 'OTHERS'.
      " DO NOTHING
      ENDCASE.
      ENDMETHOD.
    ENDCLASS.
    Data: event_receiver TYPE REF TO lcl_event_receiver.
    START-OF-SELECTION.
    Selection-Screen BEGIN OF BLOCK 1 with frame title text-001.
    Parameters:  start   like /bic/azincosvi00-BILL_DATE.
    Selection-Screen END OF BLOCK 1.
    Selection-Screen BEGIN OF BLOCK 3 with frame title text-003.
    Parameters: guid         type /BIC/OIZGUID_DSR,
                pcode        type /BIC/OIZPGMCODE,
                scode        type /BIC/OIZSUBCODE,
                reason       type /BIC/OIZEXCPTC,
                quantity(5)  type n,
                discount     type /BI0/OISUBTOTAL_4.
    Selection-Screen END OF BLOCK 3.
    END-OF-SELECTION.
    IF quantity <> '00000'.
       if pcode <> 'SCTMS'.
          message e000 with 'Quantity can only be used with seating spiff'.
       endif.
    ENDIF.
    GET REPORT PERIOD INFO using today's date.
      select single * from /bic/mzrptprdcr INTO rpt_per_rec
          where calyear  = sy-datum(4)
            and /bic/zpgmcode  = pcode
            and ( /BIC/ZRPPRDSTR <= start
                  and /BIC/ZRPPRDEND >= start ) .
      if sy-subrc <> 0.
        message e000 with
        'Report Period NOT FOUND for' pcode ' ' sy-datum(4).
      endif.
    Select Active Guid based upon user entry on selection-screen
    Select single * from /bic/mzguid_dsr into active_guid
                                      where /bic/zguid_dsr = guid
                                      and   /bic/zdsrstat = 'A'.
        If sy-subrc <> 0.
        MESSAGE e000 WITH 'Please enter a valid GUID'.
        ENDIF.
    Select DSR Code based upon a valid guid entered
    Select single /bic/zdsrcode from /bic/mzdsrcode into dsrcode
                                     where /BIC/ZGUID_DSR = guid
                                     and   /BIC/ZDSRCDST = 'A'.
        If sy-subrc <> 0.
        MESSAGE e000 WITH 'GUID entered does not have an active dsr code.'.
        ENDIF.
    Select MAX( /BIC/ZRCRDKEY ) FROM /BIC/AZINCOSVI00 INTO WA_CREDIT-/BIC/ZRCRDKEY.
    UNIQUEKEY = WA_CREDIT-/BIC/ZRCRDKEY + 1.
    WA_CREDIT-/BIC/ZRCRDKEY = UNIQUEKEY.
    WA_CREDIT-PO_NUMBER = UNIQUEKEY.
    WA_CREDIT-/BIC/ZERDAT = SY-DATUM.
    WA_CREDIT-BILL_DATE = SY-DATUM.
    WA_CREDIT-/BIC/ZRPPRDSTR = rpt_per_rec-/BIC/ZRPPRDSTR.
    WA_CREDIT-/BIC/ZRPPRDEND = rpt_per_rec-/BIC/ZRPPRDEND.
    WA_CREDIT-/BIC/ZCUBPRCDT = SY-DATUM.
    WA_CREDIT-/BIC/ZRPTPRDCR = rpt_per_rec-/BIC/ZRPTPRDCR.
    WA_CREDIT-/BIC/ZINCPYPRC = '00000000'.
    WA_CREDIT-/BIC/ZGUID_DSR = ACTIVE_GUID-/bic/zguid_dsr.
    WA_CREDIT-/BIC/ZDSRCODE = dsrcode.
    WA_CREDIT-/BIC/ZPGMCODE = PCODE.
    WA_CREDIT-/BIC/ZUNASSIGN = 'N'.
    WA_CREDIT-/BIC/ZSUBCODE = SCODE.
    WA_CREDIT-/BIC/ZSITE_ICR = ACTIVE_GUID-/BIC/ZSITE_IRG.
    WA_CREDIT-/BIC/ZSUSPEND = 'N'.
    WA_CREDIT-/BIC/ZSUSPNDR = ' '.
    WA_CREDIT-/BIC/ZSITE_IRG = ACTIVE_GUID-/BIC/ZSITE_IRG.
    WA_CREDIT-/BIC/ZSITE_CST = ' '.
    WA_CREDIT-/BIC/ZINCBONUS = '0.00'.
    WA_CREDIT-STAT_CURR = 'USD'.
    WA_CREDIT-DOC_CURRCY = 'USD'.
    WA_CREDIT-SALES_UNIT = 'ST'.
    WA_CREDIT-CALYEAR =  SY-DATUM(4).
    WA_CREDIT-/bic/ZCASEID = SY-UNAME.
    WA_CREDIT-/bic/ZSLSRSN = REASON.
    WA_CREDIT-RECORDMODE = ' '.
    *Depending on Program Code, populate the amounts to be paid.
    Data: fivepercent type p.
          fivepercent = '0.05'.
    If pcode = 'SCW5S' or pcode = 'SCTMS'.
    Select single * from /bic/mzsubcode into payrec
                         where /bic/zpgmcode = pcode
                         and /bic/zsubcode = scode
                         and CALYEAR = sy-datum(4).
          if sy-subrc <> 0.
            write: / '**************  ERROR  ***********************',
                   / '** Missing Program Information for ',
                   /  pcode,
                      scode,
                      sy-datum(4),
            exit.
            endif.
    ENDIF.
    If pcode = 'SCW5S'.
    WA_CREDIT-/BIC/ZINCUSDDS = discount.
    WA_CREDIT-/BIC/ZPAYAMTUS = WA_CREDIT-/BIC/ZINCUSDDS * payrec-/bic/zpayper / 100.
    WA_CREDIT-SUBTOTAL_4 = discount.
    WA_CREDIT-/BIC/ZINC_QTY = ' '.
    Endif.
    If pcode = 'SCTMS'.
    WA_CREDIT-/BIC/ZPAYAMTUS = quantity * payrec-/bic/zpayper / 100.
    WA_CREDIT-/BIC/ZINCUSDDS = '0.00'.
    WA_CREDIT-SUBTOTAL_4     = '0.00'.
    WA_CREDIT-/BIC/ZINC_QTY = quantity.
    Endif.
    If pcode = 'SCTB'.
    WA_CREDIT-/BIC/ZPAYAMTUS = '0.00'.
    WA_CREDIT-/BIC/ZINCUSDDS =  DISCOUNT.
    WA_CREDIT-SUBTOTAL_4 =  DISCOUNT.
    WA_CREDIT-/BIC/ZINC_QTY = ' '.
    Endif.
    *Create ALV Grid to show the user what the record will look like in which they are creating.
    Append wa_credit to alv_itab.
    CALL SCREEN 100.
    *&      Module  PBO  OUTPUT
          text
    MODULE alv_pbo OUTPUT.
      SET PF-STATUS 'MAIN100'.
      SET TITLEBAR  'MAIN100'.
      IF g_custom_container IS INITIAL.
    CREATE OBJECT grid1
    EXPORTING i_parent = g_custom_container.
        CALL METHOD grid1->set_table_for_first_display
          EXPORTING
            i_structure_name = '/bic/azincosvi00'
           CHANGING
            it_outtab        = alv_itab.
        CREATE OBJECT event_receiver.
        SET HANDLER event_receiver->handle_user_command FOR grid1.
        SET HANDLER event_receiver->handle_toolbar FOR grid1.
        CALL METHOD grid1->set_toolbar_interactive.
      ENDIF.
    ENDMODULE.                 " PBO  OUTPUT
    *&      Module  PAI  INPUT
          text
    MODULE alv_pai INPUT.
      save_ok = ok_code.
      CLEAR ok_code.
      CASE save_ok.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
        WHEN 'CANCEL'.
          LEAVE PROGRAM.
        WHEN 'BACK'.
          CALL METHOD grid1->free.
          CALL SELECTION-SCREEN '1000'.
        WHEN OTHERS.
        " DO NOTHING.
      ENDCASE.
    ENDMODULE.                " PAI  INPUT
    *&      Module  200_PBO  OUTPUT
          text
    MODULE 200_PBO OUTPUT.
      Write at 5: 'Increase DSP Sales'.
      Skip 1.
      Write at 5: 'USER'.
      Write at 15:'PROGRAM CODE'.
      WRITE AT 25:'SUB CODE'.
      WRITE AT 37:'DISCOUNTED SALES'.
      WRITE AT 67:'PAY AMOUNT US'.
      WRITE AT 80:'REASON'.
    ENDMODULE.                 " 200_PBO  OUTPUT

    There are some problems with ok_code, you need to assign sy-ucomm at each module.  Also the main problem was that you needed leave to list-processing and suppress dialog before writing.  However, when you do this the screens calls change a little. You also needed to use the container correctly.  Apply the correctons below and you'll be all set. Unfortunaley you will have to play around with calling the sel. screen (1000) from screen 100, I don't think call sel. screen 1000 will work properly there (you might need a custome screen instead).  The user may be okay with kicking back out to sa38 after the alv display, however.  Good luck and don't listen to the clowns' comments above. I once worked in that circus,    Hey Guys.
    Instead of this:
    METHOD handle_user_command.
    CASE e_ucomm.
    WHEN 'CREATE'.
    Insert /bic/azincosvi00 from wa_credit.
    CALL METHOD grid1->free.
    SET SCREEN '200'.
    WHEN 'OTHERS'.
    " DO NOTHING
    ENDCASE.
    ENDMETHOD.
    <b>DO THIS:</b>
      METHOD handle_user_command.
        CASE e_ucomm.
          WHEN 'CREATE'.
            Insert /bic/azincosvi00 from wa_credit.
            CALL SCREEN 200.
          WHEN 'OTHERS'.
            " DO NOTHING
        ENDCASE.
      ENDMETHOD.                    "handle_user_command
    <b>Instead of this:</b>
    *Create ALV Grid to show the user what the record will look like in which they are creating.
    Append wa_credit to alv_itab.
    CALL SCREEN 100.
    <b>DO THIS:</b>
      IF g_custom_container IS INITIAL.
        CREATE OBJECT g_custom_container EXPORTING dynnr = '100'
                                          repid = sy-cprog
                                          ratio = '95'.
      ENDIF.
      IF grid1 IS INITIAL.
        CREATE OBJECT grid1 EXPORTING i_parent = g_custom_container.
      ENDIF.
      CREATE OBJECT event_receiver.
      SET HANDLER event_receiver->handle_user_command FOR grid1.
      SET HANDLER event_receiver->handle_toolbar FOR grid1.
      SET SCREEN 100.
      CALL SCREEN 100.
    <b>Instead of this:</b>
    MODULE alv_pbo OUTPUT.
    SET PF-STATUS 'MAIN100'.
    SET TITLEBAR 'MAIN100'.
    IF g_custom_container IS INITIAL.
    CREATE OBJECT grid1
    EXPORTING i_parent = g_custom_container.
    CALL METHOD grid1->set_table_for_first_display
    EXPORTING
    i_structure_name = '/bic/azincosvi00'
    CHANGING
    it_outtab = alv_itab.
    CREATE OBJECT event_receiver.
    SET HANDLER event_receiver->handle_user_command FOR grid1.
    SET HANDLER event_receiver->handle_toolbar FOR grid1.
    CALL METHOD grid1->set_toolbar_interactive.
    ENDIF.
    ENDMODULE. " PBO OUTPUT
    <b>DO THIS:</b>
    MODULE alv_pbo OUTPUT.
      SET PF-STATUS 'MAIN100'.
      SET TITLEBAR  'MAIN100'.
    CALL METHOD grid1->set_table_for_first_display
      EXPORTING
         i_structure_name = '/bic/azincosvi00'
      CHANGING
         it_outtab = alv_itab.
      CALL METHOD grid1->set_toolbar_interactive.
    ENDMODULE.                 " PBO  OUTPUT
    <b>Instead of this:</b>
    MODULE alv_pai INPUT.
    save_ok = ok_code.
    CLEAR ok_code.
    CASE save_ok.
    WHEN 'EXIT'.
    LEAVE PROGRAM.
    WHEN 'CANCEL'.
    LEAVE PROGRAM.
    WHEN 'BACK'.
    CALL METHOD grid1->free.
    CALL SELECTION-SCREEN '1000'.
    WHEN OTHERS.
    " DO NOTHING.
    ENDCASE.
    ENDMODULE. " PAI INPUT
    <b>DO THIS:</b>
    MODULE alv_pai INPUT.
      ok_code = sy-ucomm.
      CASE ok_code.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
        WHEN 'CANCEL'.
          LEAVE PROGRAM.
        WHEN 'BACK'.
          CALL METHOD grid1->free.
          LEAVE PROGRAM.
    *       CALL SELECTION-SCREEN '1000'.
        WHEN OTHERS.
          " DO NOTHING.
      ENDCASE.
    ENDMODULE.                " PAI  INPUT
    <b>Instead of this:</b>
    MODULE 200_PBO OUTPUT.
    Write at 5: 'Increase DSP Sales'.
    Skip 1.
    Write at 5: 'USER'.
    Write at 15:'PROGRAM CODE'.
    WRITE AT 25:'SUB CODE'.
    WRITE AT 37:'DISCOUNTED SALES'.
    WRITE AT 67:'PAY AMOUNT US'.
    WRITE AT 80:'REASON'.
    ENDMODULE. " 200_PBO OUTPUT
    <b>DO THIS:</b>
    *Take care of all your list output here
      LEAVE TO LIST-PROCESSING.
      SET PF-STATUS 'MAIN200'.
      SET TITLEBAR  'MAIN200'.
      SUPPRESS DIALOG.
      WRITE AT 5: 'Increase DSP Sales'.
      SKIP 1.
      WRITE AT 5: 'USER'.
      WRITE AT 15:'PROGRAM CODE'.
      WRITE AT 25:'SUB CODE'.
      WRITE AT 37:'DISCOUNTED SALES'.
      WRITE AT 67:'PAY AMOUNT US'.
      WRITE AT 80:'REASON'.
    ENDMODULE.                 " 200_PBO  OUTPUT
    <b>Add Moule:</b>
    MODULE 200_pai INPUT.
      ok_code = sy-ucomm.
      CASE ok_code.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
        WHEN 'CANCEL'.
          LEAVE PROGRAM.
        WHEN 'BACK'.
          CALL SCREEN 100.
        WHEN OTHERS.
          " DO NOTHING.
      ENDCASE.
    ENDMODULE.                 " 200_PAI  INPUT

  • Need help with my applet. I am new to applets...Please help..please...

    Here is one method from the class:
    public void update(Graphics g) {     
              Dimension d = size();
                   int w = sky.getWidth(this);
              int h = sky.getHeight(this);
                   // If we've loaded the moving image, draw it.
              if ((w > 0) && (h > 0)) {
                   g.drawImage(sky, ((frameNumber*12) % (w+d.width))-w,
         (d.height - h), this);
                   g.drawImage(bird,x,y,this);
    Okay. The applet runs. However, when the sky moves across as the background, as soon as it shifts completely off the view, it gets all wierd and blurry. Then, when it shifts in again, it goes back to normal. It's supposed to go from left to right, start again at the left again, and then go right again...going only right...How do I stop it from getting all wierd?
    Also, the bird image gets all staticky...all I do is increment/decrement the x and y (private int variables) in the keyPressed method (with a multi-way if). I read somewhere the solution to this problem is double-buffering...which I don't understand how to implement with my images....Sky and bird are both GIFs...
    Edited by: LinksApprentice on May 17, 2008 7:49 AM

    If you don't get a great answer (or even if you do) a great resource that I suggest you read is an article entitled [How To Ask Questions The Smart Way|http://www.catb.org/~esr/faqs/smart-questions.html] . It will tell you how to formulate your questions so that the folks here will be better able to answer them. Good luck.

  • Need some help with an applet

    I looked on the site here, read all the topics on it, and tried them all.
    but I can't get an applet to run on apex.
    I tried <applet> and <object> I get the same thing. the applet just does not work. I created the applet on jdeveloper and moved the .jar file into the static files area.
    I put the applet on apex.oracle.com at : http://apex.oracle.com/pls/apex/f?p=43533:1
    user id is guest, password is apex1234
    perhaps someone can look at this page and source code and tell me what I have done wrong? or maybe explain how to use the java console that pops up for details ?
    the applet works fine in jdeveloper.
    any help would be great..

    Looks like your code is trying to access http://apex.oracle.com/pls/apex/MyPack/MyCalc/class.class, whereas your applet is a workspace file (retrieved via wwv_flow_file_mgr.get_file). So essentially, code="..." and archive="..." arent following the same path conventions.
    &lt;applet name="MyCalc"
    code="MyPack/MyCalc.class"
    archive="wwv_flow_file_mgr.get_file?p_security_group_id=6032196320393432956&p_flow_id=43533&p_fname=MyCalc.jar"
    width="350"
    height="350"&gt;
    My applet works fine, and is located in XDB (I use EPG and it pretty much limits my file location options) in an open area, similar to /i/... (where Apex images, css etc are located), and so my code and archive locations are consistent.
    The applet could be hosted at any URL - it doesnt have to be in Apex.

Maybe you are looking for

  • 8.0.5 Memory Leak ?

    I have an 8.0.5.0 database running on RedHat 6.0 that seems to be leaking memory. When the database is started, after a reboot for example, 100meg of memory is used. When connections are made to the database the amount of memory used increases but is

  • Beginning of song plays twice

    I have seceral songs that play the first few seconds, and then start over and play the entire song.  To make this as clear as possible:  It is like I started playing the song, stopped it, went back to the beginning and played the song. Does anyone ha

  • STILL cannot save an alias

    I have been trying every day for months now and I'm still unable to create an alias, every time I try I get the response of THIS ALIAS CANNOT BE SAVED AT THIS TIME.  I have tried a variety of different name options incase it was that the name had alr

  • My car charger got stuck in my iPod nano's usb/charge port.

    One side releases, but the other feels jammed. I would try ripping it out, but that would risk breaking it to the point where the port is just completely broken. Can Apple fix this problem in anyway? Possibly replacing the iPod or repairing the speci

  • Url filtering Route policy Firewall ?

    Hello, I'd like to know if it's possible to make a route policy (based on an identity matched by url white list) that redirect http trafic to a firewall (Juniper SSG550M). The objectif is to separate traffic depending on url request as professionnal