JEditorPane - delay in setPage... (threads?)

Mmmm....
I've got the following code which "does something time consuming", hence I want to display a "loading" page whilst it does it....
However, it seems that java only calls setPage at the end of the actionPerformed method. Hence file:///c:/temp/loading.html is shown once the action is complete! (and disappears as quickly as it appears because it is setPage is called again).
Any ideas???
JEditorPane htmlPane = new JEditorPane();
JButton button = new JButton("Do something time consuming");
button.addActionListener(new ActionListener()
   public void actionPerformed(ActionEvent evt)
      //attempt to display loading message
      try
         htmlPane.setPage("file:///c:/temp/loading.html");
      catch (IOException e)
         System.out.println(e.getMessage());
      //do something time consuming....
      for (int i = 0; i < 100000; i++)
         System.out.println(i);
      try
         htmlPane.setPage("file:///c:/temp/index.html");
      catch (IOException e)
         System.out.println(e.getMessage());
}); Cheers,
Ben

Check out this thread for an explanation/solution:
http://forum.java.sun.com/thread.jsp?forum=57&thread=43592
Exactly what I was looking for!!
I had already searched the forums, but I guess its difficult to find what you are after if you don't know what you are looking for!! ;-)
Cheers,
Ben

Similar Messages

  • Using more than one time delay in a thread

    Hello,
         I need to use two non-consecutive time delays in a thread. My thread typically proceeds as follows:
    1. Tell an oriel MS257 to change wavelengths
    2. Time delay #1 to give the MS257 time to change
    3. Tell HP 4156C to start sweeping
    4. Poll the 4156C until sweeping is complete
    5. Time delay #2 to give 4156C time to load data
    6. Read/parse/save data
    My problem is that the second time delay seems to start counting immediately after the first one - it does not wait for the sweeping to complete before counting. My VI is attached. It's a bit messy - organizational tips are also welcome!
    Thanks,
    Ying 
    Solved!
    Go to Solution.
    Attachments:
    TFTmeasure.vi ‏115 KB

    Looking into the sources show: Cleanup is a nice tool (even thought it is far from perfect )
    Well, nevertheless, from the wireworking, it seems alright that the second Time Delay express VI should indeed wait for the loop to finish. Therefore, i am wondering why it is skipped. And the only reasonable explanation: You have an error on the error cluster.
    So please debug into it using highlight/probes on the error cluster to make sure that you are not running into issues here.
    hope this helps,
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Problem to display Animated Gif from HTML into JEditorPane

    I have a problem displaying animated gif that comes from URL (HTML) into JEditorPane.
    Let me show you the source I have:
    * @author Dobromir Gospodinov
    * @version 1.0
    * Date: Dec 6, 2002
    * Time: 6:47:53 PM
    package test.advertserver;
    import javax.swing.*;
    import java.awt.*;
    import java.io.IOException;
    public class Test {
         public static void main(String[] args) {
              JFrame frame = new JFrame();
              JEditorPane ed = new JEditorPane();
              try {
                   ed.setPage("http://localhost:8200/servlet?key=value");
              } catch (IOException e) {
                   e.printStackTrace();
              JPanel panel = new JPanel();
              panel.setPreferredSize(new Dimension(500, 500));
              panel.add(ed);
              frame.getContentPane().add(panel);
              frame.pack();
              frame.setVisible(true);
    }Part of the returned from servlet HTML includes an img tag:
    <img src="/images/MyAnimatedGif.gif" alt="animated gif comment" width="480" height="50"  border="0">Let us assume that MyAnimatedGif.gif has 10 frames and gif is looped - when the 10th is dipslayed it has to display the 1st and so on.
    JEditorPane displays frames from 1 to 10 correctly but does not start from the first again. Instead JEditorPane displays a broken image.
    I locate where the problem arise:
    JEditorPane has an HTMLEditorKit that creates javax.swing.text.html.ImageView instance for every IMG tag.
    And here is the problem:
    ImageView has an ImageObserver necessary for the asynchronous image download. ImageObserver has the imageUpdate method. But this imageUpdate method is never called with ALLBITS flag raised up. Instead, after the last frame of MyAnimatedGif.gif is downloaded the imageUpdate method is called with flag ERROR raised up. Obviously this is a bug of Sun's implementation. Finaly the flag ALLBITS has to be received for normal end of image observing. But ALLBITS flag does not come.
    So, can anybody help me how to load an animated gif within JEditorPane completely.
    Thank You in advance,
    Dobromir Gospodinov
    P.S. If somebody of you wants to debbug what happens within ImageView will have to implement it (and related classes too, because of the limited package visability) borrowing the source from Sun's ImageView.

    I'm also having this problem with java 1.4.1 I discovered that some animated gifs work fine, while others stop animating. Running with java 1.3.1 fixed the problem. I'm going to report this as a bug
    Here's my code:
    import java.awt.*;
    import java.io.*;
    import javax.swing.*;
    public class AnimatedGifTester
    extends JFrame
    public static void main(String argv[])
    throws Exception
    new AnimatedGifTester();
    public AnimatedGifTester()
    throws Exception
    String[] images = new String[] {
    "http://www.gif.com/ImageGallery/Animated/Animals/Photographic/dog_running.gif",
    "http://www.gif.com/ImageGallery/Animated/Characters/Cartoon/java.gif",
    "http://www.webdeveloper.com/animations/bnifiles/anielg.gif",
    "http://www.webdeveloper.com/animations/bnifiles/cat2.gif",
    "http://images.animfactory.com/animations/animals/fish/big_fish_swimming_md_wht.gif",
    "http://www.webgenies.co.uk/images/martian.gif",
    "http://www.webdeveloper.com/animations/bnifiles/at_sign_rotating.gif",
    "http://www.webdeveloper.com/animations/bnifiles/arrow_1.gif",
    "http://www.gif.com/ImageGallery/Animated/Characters/Cartoon/javaacro.gif",
    "http://java.sun.com/products/java-media/2D/samples/suite/Image/duke.running.gif",
    "http://www.gif.com/ImageGallery/Animated/SouthPark/Cartoon/stan.gif"
    StringBuffer buffer = new StringBuffer("<html><body>");
    for (int idx = 0; idx < images.length; idx++)
    buffer.append("<img src='" + images[idx] + "'>");
    buffer.append("</body></html>");
    String html = buffer.toString();
    // save a copy of the html to open in a browser so we can see what it's
    // supposed to look like
    BufferedWriter writer = new BufferedWriter(new FileWriter("animatedGifTest.html"));
    writer.write(html);
    writer.close();
    JEditorPane editorPane = new JEditorPane("text/html", html);
    editorPane.setEditable(false);
    getContentPane().add(editorPane);
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    setSize(new Dimension(400, 600));
    show();

  • The problem in the thread pool implemented by myself

    Hello, I need to a thread pool in J2ME CDC 1.0 + FP 1.0, so I implemented a simple one by myself that also meets my own requirement.
    Here is the main idea:
    The thread pool creates a fixed number of threads in advance. When a task comes, it is put in the waiting list. All threads tries to get the tasks from the waiting list. If no task exists, the threads wait until someone wakes them up.
    Here are the requirements from myself:
    1. when a task has finished its work in one execution, it is put in the waiting list for the next run.
    2. the task can control the delay between when the task owner tries to put it in the waiting list and when the task is actually put in the waiting list. I need this function because sometimes I don't want the tasks to run too often and want to save some CPU usage.
    In my program, I creates two thread pools. In one pool, every task don't use the delay, and the thread pool works very well. The other pool has the tasks that use the delay, and sometimes, as I can see from the printed information, there are many tasks in the waiting list but 0 or 1 thread executes tasks. It seems that the waiting threads cannot wake up when new tasks comes.
    I suspect the code in addTask(), but cannot find the reason why it fails. Could anyone please help me find out the bug in my code? I put the code of thread pool below
    Thank you in advance
    Zheng Da
    ThreadPool.java
    package j2me.concurrent;
    import java.util.LinkedList;
    import java.util.Timer;
    import java.util.TimerTask;
    import alvis.general.Util;
    public class ThreadPool {
         private int maxQueueSize;
         private boolean running = true;
         private Thread[] threads;
         private LinkedList tasks = new LinkedList();
         private Timer timer = new Timer(true);
         private AtomicInteger usingThreads = new AtomicInteger(0);
         private synchronized boolean isRunning() {
              return running;
         private synchronized void stopRunning() {
              running = false;
         private synchronized PoolTask getTask() {
              while (tasks.isEmpty() && isRunning()) {
                   try {
                        this.wait();
                   } catch (InterruptedException e) {
                        e.printStackTrace();
              if (tasks.isEmpty())
                   return null;
              // Util.log.info(Thread.currentThread().getName() +
              // " gets a task, left tasks: " + tasks.size());
              return (PoolTask) tasks.removeFirst();
         private synchronized void addTaskNoDelay(PoolTask task) {
              tasks.addLast(task);
              notifyAll();
         private synchronized void addTask(final PoolTask task) {
              long delay = task.delay();
              if (delay == 0) {
                   addTaskNoDelay(task);
              } else {
                   timer.schedule(new TimerTask() {
                        public void run() {
                             addTaskNoDelay(task);
                   }, delay);
         private synchronized int numTasks() {
              return tasks.size();
         private class PoolThread extends Thread {
              public void run() {
                   Util.poolThreads.inc();
                   while (isRunning()) {
                        PoolTask task = getTask();
                        if (task == null) {
                             Util.poolThreads.dec();
                             return;
                        usingThreads.inc();
                        long currentTime = System.currentTimeMillis();
                        task.run();
                        long elapsedTime = System.currentTimeMillis() - currentTime;
                        if (elapsedTime > 100)
                             System.err.println(task.toString() + " takes " + ((double) elapsedTime)/1000 + "s");
                        usingThreads.dec();
                        if (!task.finish()) {
                             addTask(task);
                   Util.poolThreads.dec();
         public ThreadPool(int size, int taskQueueSize) {
              maxQueueSize = taskQueueSize;
              threads = new Thread[size];
              for (int i = 0; i < threads.length; i++) {
                   threads[i] = new PoolThread();
                   threads.start();
         public synchronized boolean executor(PoolTask task) {
              if (!isRunning()) {
                   return false;
              Util.log.info("Thread Pool gets " + task + ", there are "
                        + numTasks() + " waiting tasks");
              if (numTasks() >= maxQueueSize) {
                   return false;
              addTask(task);
              return true;
         public synchronized void destroy() {
              stopRunning();
              timer.cancel();
              // TODO: I am not sure it can wake up all threads and destroy them.
              this.notifyAll();
         public synchronized void printSnapshot() {
              System.err.println("using threads: " + usingThreads + ", remaining tasks: " + tasks.size());
    PoolTask.javapackage j2me.concurrent;
    public interface PoolTask extends Runnable {
         * It shows if the task has already finished.
         * If it isn't, the task will be put in the thread pool for the next execution.
         * @return
         boolean finish();
         * It shows the delay in milliseconds that the task is put in the thread pool.
         * @return
         long delay();

    are receiving/sends tasks packets time consuming operation in your case or not? if it is not you do not need to use thread pools at all. you can create a queue like in your code through the linked list and dispatch this queue periodically with minimum monitor usage. try this.
    import java.util.LinkedList;
    public class PacketDispatcher extends Thread {
        LinkedList list = new LinkedList();
        public PacketDispatcher (String name) {
            super(name);
        public void putTask(Task task) {
            synchronized (list) {
                list
                        .add(task);
                list.notify();
        public void run() {
            while (true/* your condition */) {
                Task task = null;
                synchronized (list) {
                    while (list.isEmpty())
                        try {
                            list.wait();
                        } catch (InterruptedException e) {
                            e.printStackTrace();
                    task = (Task)list
                            .poll();
                if (task == null) {
                    try {
                        Thread
                                .sleep(1);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    continue;
                task
                        .run();
                if (!task.isFinished()) {
                    putTask(task);
                Thread
                        .yield();
        public static void main(String[] args) {
            // just for test
            try {
                Thread.sleep (10000);
            } catch (InterruptedException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            PacketDispatcher dispatcher = new PacketDispatcher("Packet Dispatcher");
            Task task = new Task();
            dispatcher.putTask(task);
            dispatcher.start();
            try {
                Thread.sleep (10000);
            } catch (InterruptedException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            Task task2 = new Task();
            dispatcher.putTask(task2);
    class Task {
        long result = 0;
        public boolean isFinished () {
            if (getResult() >= 10000000) {
                return true;
            return false;
        public void run() {
            for (int i = 0; i < 1000; i++) {
                result += i;
        public long getResult () {
            return result;       
    }

  • JTree display issues and thread safety

    I've recently ran into some issues with a JTree not displaying correctly. Infrequently, blank space will appear in the tree (big gaps between consecutive nodes), or the text of a node will be cut off ending with a "...". This happens when (but not yet proven a direct result of) one thread is expanding a node of the tree while another thread is inserting nodes into one of the expanding node's children through calls to DefaultTreeModel.insertNodeInto. (what I'm doing here is lazy loading the children's children when the parent is expanded, and the lazy loading is performed by a seperate thread so as not to delay the main thread.) It does not happen if the second thread simply adds child nodes without using the DefaultTreeModel's insertNodeInto method.
    I think what might be happening here is that the DefaultTreeModel.insertNodeInto method is calling fireTreeNodesInserted which I think is in turn causing nodes in the tree to be re-rendered. This got me thinking that the problem may come down to the DefaultTreeCellRenderer being used by the two threads simultaneously. DefaultTreeCellRenderer extends JLabel and returns itself in the getTreeCellRendererComponent method. If two threads were causing nodes to be rendered at the same time, it would seem the rendered label could be occasionally in an inconsistent state.
    Anyone ran into a situation like this before? The problem of text being cut off seems to be eliminated by having a custom renderer return a new component each time, rather than returning itself, but this results in degraded performance. It's almost as if each thread would need it's own renderer (or the renderer would need to return a different component for each thread), but I'm not sure how this would be done. And this doesn't solve the problem of gaps appearing in the tree.
    As for the gaps, I think this might be solved by changing when the children's children are getting loaded in respect to the parent node expanding. At first I was using a TreeWillExpandListener that fired off loading the children's children. I think I might can solve the white space in the tree problem by changing that to a TreeExpansionListener that uses the treeExpanded method. So far this seems to be working...so that the parent node is done expanding before the second thread begins loading the children's children.
    Any thoughts?

    I actually found the thread3 article first... since there doesn't seem to be direct links between them, I thought I would add for anyone who reads this thread that there are several related articles. sabre150 linked the first; the others are the same base URL but with the number incremented for each. For example, the 2nd article is:
    [http://java.sun.com/products/jfc/tsc/articles/threads/threads2.html]
    And the 3rd article, which most directly applies to what I am doing, is:
    [http://java.sun.com/products/jfc/tsc/articles/threads/threads3.html]
    Edited by: Skotty on Mar 5, 2009 9:35 PM -- links turned into actual links
    Edited by: Skotty on Mar 5, 2009 9:36 PM -- formatted for nicer display

  • Recording movement on screen as movie file, delay problem

    Hi i am working on a project which has a number of moving agents (just square squares moving around in an applet). Basically what i am trying to do is capture what is going on as a quicktime movie. I have it working to a certain extent. At the moment i have a streaming class which captures the screen using a recordFrame() method and saves the RGB values in an array which is buffered via the datasource and saved to disk using a data sink.
    The recordFrame() method is called every time i call the repaint method in my "moving agents" class (i.e the new positions of the agents in the applets). The problem is when the recordFrame() method is called it delays the update() method for the applet meaning it is not a true reflection of what would really happen if i had no data sink implemented.
    I am new to JMF and know this is probably not an ideal way to implement this so any ideas or pointers would be greatly appreciated!!
    Below is the snippets of my code:
    Class MovingObject
                   while(prey.getState() != deadState  && started)
                        //While agent has not reached the edge of the agentStage move 1 pixel to the right     
                        try
                        {     currentTime +=delay;
                             Thread.sleep(Math.max(0, currentTime -    System.currentTimeMillis()));
                        catch (InterruptedException e)
                             System.out.println(""+e);
                             break;
                        pred.update(stageMap);
                        sleep();
                        repaint();
                        Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
    public class RecordImageSequences implements Serializable
        Processor mediaProcessor;
        ScreenStream liveStream;
        DataSource dataSource;
        DataSink outputSink;
        BufferedImage image;
        Robot robot;
        public RecordImageSequences(String outputFilename,int x, int y, int width, int height) throws Exception
                  image = new BufferedImage(width,height, BufferedImage.TYPE_INT_RGB);
            liveStream = new ScreenStream(x,y,width, height);
            dataSource = new DataSource(liveStream);
            VideoFormat formats[] = new VideoFormat[1];
            formats[0] = new VideoFormat(VideoFormat.RGB);
            mediaProcessor = Manager.createRealizedProcessor(
                new ProcessorModel(dataSource,
                    formats,
                    new FileTypeDescriptor(FileTypeDescriptor.QUICKTIME)));
            outputSink = Manager.createDataSink(
            mediaProcessor.getDataOutput(), new MediaLocator("file://movie.mov"));
            outputSink.open();
            mediaProcessor.start();
            outputSink.start();
        public void recordFrame()
                  liveStream.getFrame();
    import java.awt.Dimension;
    import java.awt.Rectangle;
    import java.awt.Robot;
    import java.awt.image.BufferedImage;
    import java.io.IOException;
    import java.io.Serializable;
    import javax.media.Buffer;
    import javax.media.Format;
    import javax.media.Time;
    import javax.media.format.RGBFormat;
    import javax.media.format.VideoFormat;
    import javax.media.protocol.BufferTransferHandler;
    import javax.media.protocol.ContentDescriptor;
    import javax.media.protocol.PushBufferDataSource;
    import javax.media.protocol.PushBufferStream;
    public class ScreenStream implements PushBufferStream, Serializable
        ContentDescriptor contentDesc = new ContentDescriptor(ContentDescriptor.RAW);
        int maxDataLength;
        Dimension size;
        RGBFormat rgbFormat;
        float frameRate = 2.5f;
        BufferTransferHandler transferHandler;
        int width, height, x, y;
        boolean streamEnded = false;
        boolean started = false;
        BufferedImage imageToBeRead = null;
        Robot robot;
        BufferedImage image = new BufferedImage(100,100, BufferedImage.TYPE_INT_RGB);
        public ScreenStream(int x, int y, int width, int height)
            this.width = width;
            this.height = height;
            this.x = x;
            this.y = y;
            size = new Dimension(width, height);
            maxDataLength = size.width * size.height * 3;
            rgbFormat = new RGBFormat(size, maxDataLength,
                                      Format.intArray,
                                      frameRate,
                                      32,
                                      0xFF0000, 0xFF00, 0xFF,
                                      1, size.width,
                                      VideoFormat.FALSE,
                                      RGBFormat.BIG_ENDIAN);
           try
                     robot = new Robot();
           catch(Exception e){}
           started = true;
        public ContentDescriptor getContentDescriptor()
            return contentDesc;
        public long getContentLength()
            return LENGTH_UNKNOWN;
        public boolean endOfStream()
            return streamEnded;
        int seqNo = 0;
        public Format getFormat()
            return rgbFormat;
        public void read(Buffer buffer) throws IOException
            if(streamEnded)
                buffer.setEOM(true);
                buffer.setOffset(0);
                buffer.setLength(0);
                return;
            Object outdata = buffer.getData();
            if (outdata == null || !(outdata.getClass() == Format.intArray) ||
                ((int[])outdata).length < maxDataLength)
                outdata = new int[maxDataLength];
                buffer.setData(outdata);
            buffer.setOffset(0);
            buffer.setFormat(rgbFormat );
            buffer.setTimeStamp( (long) (seqNo * (1000 / frameRate) * 1000000) );
            imageToBeRead = getImage();
            imageToBeRead.getRGB(0, 0, width, height,
                      (int[])outdata, 0, width);
            buffer.setSequenceNumber( seqNo );
            buffer.setLength(maxDataLength);
            buffer.setFlags(buffer.getFlags() | Buffer.FLAG_KEY_FRAME);
            buffer.setHeader( null );
            seqNo++;
            imageToBeRead = null;
            synchronized(this)
                notifyAll();
        public synchronized void setTransferHandler(BufferTransferHandler transferHandler)
            this.transferHandler = transferHandler;
            notifyAll();
        int i=0;
    public void getFrame()
        //while (started)
           //Wait till the previous image is read
         synchronized(this)
                while((imageToBeRead != null || transferHandler == null) && started)
                               try
                                   System.out.println("WAITING");
                                    wait();
                               catch(Exception exp){}
                 if (started && transferHandler != null)
                      imageToBeRead = getImage();
                System.out.println("CHEESE, Frame"+i+""+started);
                transferHandler.transferData(this);
                i++;
                       try
                            Thread.currentThread().sleep(10);
                            System.out.println("Wait");
                       catch (InterruptedException e) {}
         public BufferedImage getImage()
              return robot.createScreenCapture(new Rectangle(x, y, width, height));
        public void endStream()
            synchronized(this)
                while(imageToBeRead != null || transferHandler == null)
                    try
                              wait();
                catch(Exception exp){}
            streamEnded = true;
            started = false;
            transferHandler.transferData(this);
        public Object [] getControls()
            return new Object[0];
        public Object getControl(String controlType)
            return null;
    }  I would Appreciate any help with this, as i am completely new to JMF.

    After looking over it again the while loop in my MovingObject class should look like the following (the all important recordFrame() is missing).
    the recorder RecordImageSequences object would also be initialed in the MovingObject class, something like this:
    RecordImageSequences recorder = new RecordImageSequences(filename,appletTopLeftX,appletTopLeftY,appletWidth,appletHeight);
    //While the applet  is still running. i.e. the agent in the applet are  still                                                
    //moving around
    while(prey.getState() != deadState  && started)
    try
             //Simply delays the running thread, to allow a delay between update() calls
             currentTime +=delay;
         Thread.sleep(Math.max(0, currentTime -    System.currentTimeMillis()));
    catch (InterruptedException e)
           System.out.println(""+e);
         break;
    //This is using an external class to update the agents in the applet, in                                      //their new positions
    pred.update(s tageMap);
    //Reapints the applet, with the agents in the new positions
    repaint();
    /*********UPDATED******/
      //This method is called to record the newly updated applet
      recorder.recordFrame();
    /**********/UPDATED****/
    Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
    }

  • JEditorPane.... HTML file

    Please Help...
    I have been trying to add an HTML file to my JEditorPane
    using the setPage(URL/String) methods, I have had no luck,
    it throws some "unknown protocol: c" i understand that it
    is expecting a protocol like http:, the likes, but how do
    I bypass this as I want it do display an html file which
    is on my local drive... I do not want to use setText(String)
    setting my HTML tags in string...
    Thanks in advance
    Kaneval

    Create a file object for you local html file. Convert
    this file to a URL object.
    File htmlFile=new File(fileName);
    URL myhtmlUrl=htmlFile.toURL();
    Then you can use this URL object to display the html
    page.
    Thanks a lot
    Kaneval

  • Http Requsest Methods ... in JEditorPane?

    How would I alter the http request method that JEditor(and consequently JText)Pane uses in its setPage() method?
    I cannot override setPage() to accomplish this, because setPage uses several variables with private access in JEditorPane and no get/set methods.
    I cannot override getStream (Which JEditorPane uses in SetPage), because it uses a variable which has private access in JEditorPane (pageProperties) and for which there are not getting/setting methods.
    I cannot extend URL and override openConnection; URL is final.
    Any ideas?
    Message was edited by:
    Gengar003

    This was a part of the old package.

  • Frame(sprite) animation delay problem

    import javax.microedition.lcdui.*;
    import javax.microedition.lcdui.game.*;
    public class ExampleTrialCanvas extends GameCanvas implements Runnable {
    private boolean isPlay; // Game Loop runs when isPlay is true
    private long delay; // To give thread consistency
    private int currentX, currentY; // To hold current position of the 'X'
    private int width; // To hold screen width
    private int height; // To hold screen height
    // Sprites to be used
    // private Sprite playerSprite;
    private Sprite backgroundSprite;
    private Sprite playerSprite;
    //private int i;
    // Layer Manager
    private LayerManager layerManager;
    // Constructor and initialization
    public ExampleTrialCanvas() throws Exception {
    super(true);
    width = getWidth();
    height = getHeight();
    currentX = 64;
    currentY = 150;
    delay = 100;
    // Load Images to Sprites
    Image playerImage = Image.createImage("/transparent.png");
    playerSprite = new Sprite (playerImage,32,32);
    Image backgroundImage = Image.createImage("/gillete.png");
    backgroundSprite = new Sprite(backgroundImage);
    layerManager = new LayerManager();
    layerManager.append(playerSprite);
    layerManager.append(backgroundSprite);
    // Automatically start thread for game loop
    long now, prev_time_moved;
    public void init(){
    now = System.currentTimeMillis();
    prev_time_moved = now;
    public void start() {
    isPlay = true;
    Thread t = new Thread(this);
    t.start();
    public void stop() { isPlay = false; }
    // Main Game Loop
    public void run() {
    Graphics g = getGraphics();
    while (isPlay == true) {
    input();
              drawScreen(g);
    try { Thread.sleep(delay); }
    catch (InterruptedException ie) {}
    // Method to Handle User Inputs
    private void input()
    int keyStates = getKeyStates();
    playerSprite.setFrame(0);
    // Up
    if ((keyStates & UP_PRESSED) != 0) {
         for(int i=0;i<5;i++)
         playerSprite.setFrame(i);
    // Method to Display Graphics
    private void drawScreen(Graphics g) {
    // updating player sprite position
    playerSprite.setPosition(currentX,currentY);
    // display all layers
    layerManager.paint(g,0,0);
    layerManager.setViewWindow(55,20,180,180);
    //layerManager.paint(g,20,20);
    flushGraphics();
    We want, on right click botton press the frame should animate.
    We have a player with 5 different poses, kicking a ball, "image width is 160, height is 32".
    the problem is that, the player does move through allthe frames. he starts from 0th p\frame and directly end at the last frame, withopur any delay between frames.
    we have used the for loop as follows.
    if ((keyStates & UP_PRESSED) != 0) {
         for(int i=0;i<5;i++)
         playerSprite.setFrame(i);
    we want a delay code between all the frames.

    Maybe this will help you!
    btnSignIn.addActionListener(new ActionListener()     
                                  public void actionPerformed(ActionEvent e)
                                      //display the glasspane first
                                      setGlassPane(new MyGlassPane(newAnimatedIcon("images/LoginWaitingIcon.png")));
                                      getupGlasPane.setVisible(true);        //expected the glassPane shows (it does), and the animation starts (it doesnt)
                                      Thread t1 = new Thread(new Runnable()    //The animation only starts when this thread finished
                                            public void run()
                                                 //DO THE REST
    t1.start();
    t1.join();
    setupGlasPane(false);   //finish, turning off
                       });

  • !!!-Need help for terminating a Java thread in real time

    Hi everyone!
    I use J2SDK1.4.1 on a Unix platform.
    I want to terminate (or stop) a running java thread, which is dealing with time consuming tasks, in real-time (for example: the delay before the thread is terminated can't beyond one second), However, I don't know which techniques I can use to make sure the previous (or old) running java threads have been terminated?
    Could you please give me any help if you can?
    Any suggestion or reply will be kindly appreciated!
    Thanks!

    Thanks very much, jverd !
    I do set a flag that the thread should periodically check !
    Well, the scenario is like this:
    1. the thread read line by line (using BufferedReader) string from a probably huge-size file
    2. analyse each string read from the file if required (some strings may be omitted based on the user's operations), the analyzing process is a time-consuming task, and the analysing process may be terminated at any time the user want.
    3. record only the strings that have been analyzed by the previous process into a recording file
    The problem I meet is as follows: (Here, I suppose that it should take at least 30 seconds to finish analyse all the strings in a given huge file )
    1. the user start the analysing process, and run it for only 5 seconds,then stop the analyzing.
    2. the user start the analysing process again from the begining of the file(analyse the strings within the same file as previous step), and then stop the analysing process at 10 second. (it means, this time the analysing process is running for 10 seconds, still haven't finish analyse all the strings in the file).
    Once I open the record file, I saw some of the strings in the recording file have been repetitively record for 2 times, and the repetitive strings are just the strings the analysing time from at 5 second to at 10 second.
    And the repetitive times are depend on how many time the user start and stop the analysing process using the same file. for example, based on the above two steps, the user do the third step as follow:
    3. the user start the analysing process once again, analyse the same file,too. And run it for 15 seconds
    This time open the recording file, this time I saw some of the strings have been repetitively record for 3 times, and the repetitive strings are just the strings the analysing time from at 10 second to at 15 second.
    So, I guess the problem is probably because the previous analysing threads haven't been terminated completely, or say they just are blocked or set as inactive etc., then when the next time start the analysing process, the old threads will be reactive,and rerun ffrom the last time they are blocked.
    I hope you had catched what I mean, if you not, please ust let me know, I'll try to explain it again.
    Thanks once again!

  • Transient modifier to sleeping thread?

    Hi
    I'm messing about with the 'transient' modifier when serializing a threaded object; I have written a delay into the thread to slow it down however the delay stops me from serializing it.
    Does anyone know how I can apply the transient modifier to the following code?
    Or perhaps give me a better way of pausing an active thread?
    many thanks!
    Dave
    public static void oneSec() {
            try {
                Thread.currentThread().sleep(200);
            } // try
            catch (InterruptedException e) {
                e.printStackTrace();
            } // catch
        } // oneSec()

    Thread.sleep(). It always applies to the current thread.
    I don't understand the rest of your question. You can't make a thread transient; you can't serialize a thread. Maybe your object should be Runnable instead of extending Thread?

  • Mapping/invoking key codes in a GameCanvas's main game loop.

    I'm trying to bind some diagonal sprite movement methods to the keypad. I already know that I have to map out the diagonals to key codes since key states only look out for key presses in the upper half of the phone (d-pad, soft buttons, etc...). Problem is, how do I invoke them in the main game loop since a key state can be encapsulated in a method and piped through the loop? What makes this even worst is a bug that my phone maker's game API (Siemens Game API for MIDP 1.0, which is their own implementation of the MIDP 2.0 Game API) has, in which if I override the keyPressed, keyReleased, or keyRepeated methods, it will always set my key states to zero, thus I can't move the sprite at all. Also, it seems that my phone's emulator automatically maps key states to 2, 4, 6, and 8, so my only concern is how do I map the diagonal methods into 1, 3, 7, and 9, as well as invoking them in the main game loop? Enclosed is the example code that I've been working on as well as the link to a thread in the Siemens (now Benq Mobile) developer's forum about the bug's discovery:
    http://agathonisi.erlm.siemens.de:8080/jive3/thread.jspa?forumID=6&threadID=15784&messageID=57992#57992
    the code:
    import com.siemens.mp.color_game.*;
    import javax.microedition.lcdui.*;
    public class ExampleGameCanvas extends GameCanvas implements Runnable {
    private boolean isPlay; // Game Loop runs when isPlay is true
    private long delay; // To give thread consistency
    private int currentX, currentY; // To hold current position of the 'X'
    private int width; // To hold screen width
    private int height; // To hold screen height
    // Sprites to be used
    private GreenThing playerSprite;
    private Sprite backgroundSprite;
    // Layer Manager
    private LayerManager layerManager;
    // Constructor and initialization
    public ExampleGameCanvas() throws Exception {
    super(true);
    width = getWidth();
    height = getHeight();
    currentX = width / 2;
    currentY = height / 2;
    delay = 20;
    // Load Images to Sprites
    Image playerImage = Image.createImage("/transparent.PNG");
    playerSprite = new GreenThing (playerImage,32,32,width,height);
    playerSprite.startPosition();
    Image backgroundImage = Image.createImage("/background2.PNG");
    backgroundSprite = new Sprite(backgroundImage);
    layerManager = new LayerManager();
    layerManager.append(playerSprite);
    layerManager.append(backgroundSprite);
    // Automatically start thread for game loop
    public void start() {
    isPlay = true;
    Thread t = new Thread(this);
    t.start();
    public void stop() { isPlay = false; }
    // Main Game Loop
    public void run() {
    Graphics g = getGraphics();
    while (isPlay == true) {
    input();
    drawScreen(g);
    try { Thread.sleep(delay); }
    catch (InterruptedException ie) {}
    //diagonalInput(diagonalGameAction);
    // Method to Handle User Inputs
    private void input() {
    int keyStates = getKeyStates();
    //playerSprite.setFrame(0);
    // Left
    if ((keyStates & LEFT_PRESSED) != 0) {
    playerSprite.moveLeft();
    // Right
    if ((keyStates & RIGHT_PRESSED) !=0 ) {
    playerSprite.moveRight();
    // Up
    if ((keyStates & UP_PRESSED) != 0) {
    playerSprite.moveUp();
    // Down
    if ((keyStates & DOWN_PRESSED) !=0) {
    playerSprite.moveDown();
    /*private void diagonalInput(int gameAction){
    //Up-left
    if (gameAction==KEY_NUM1){
    playerSprite.moveUpLeft();
    //Up-Right
    if (gameAction==KEY_NUM3){
    playerSprite.moveUpRight();
    //Down-Left
    if (gameAction==KEY_NUM7){
    playerSprite.moveDownLeft();
    //Down-Right
    if (gameAction==KEY_NUM9){
    playerSprite.moveDownRight();
    /*protected void keyPressed(int keyCode){
    int diagonalGameAction = getGameAction(keyCode);
    switch (diagonalGameAction)
    case GameCanvas.KEY_NUM1:
    if ((diagonalGameAction & KEY_NUM1) !=0)
    playerSprite.moveUpLeft();
    break;
    case GameCanvas.KEY_NUM3:
    if ((diagonalGameAction & KEY_NUM3) !=0)
    playerSprite.moveUpRight();
    break;
    case GameCanvas.KEY_NUM7:
    if ((diagonalGameAction & KEY_NUM7) !=0)
    playerSprite.moveDownLeft();
    break;
    case GameCanvas.KEY_NUM9:
    if ((diagonalGameAction & KEY_NUM9) !=0)
    playerSprite.moveDownRight();
    break;
    repaint();
    // Method to Display Graphics
    private void drawScreen(Graphics g) {
    //g.setColor(0x00C000);
    g.setColor(0xffffff);
    g.fillRect(0, 0, getWidth(), getHeight());
    g.setColor(0x0000ff);
    // updating player sprite position
    //playerSprite.setPosition(currentX,currentY);
    // display all layers
    //layerManager.paint(g,0,0);
    layerManager.setViewWindow(0,0,101,80);
    layerManager.paint(g,0,0);
    flushGraphics();
    }EDIT: Also enclosed is a thread over in J2ME.org in which another user reports of the same flaw.
    http://www.j2me.org/yabbse/index.php?board=12;action=display;threadid=5068

    Okay...you lost me...I thought that's what I was doing?
    If you mean try hitTestPoint ala this:
    wally2.addEventListener(Event.ENTER_FRAME, letsSee);
    function letsSee(event:Event)
              // create a for loop to test each array item hitting wally...
              for (var i:Number=0; i<iceiceArray.length; i++)
                   // if you don't hit platform...
              if (wally2.hitTestPoint(iceiceArray[i].x, iceiceArray[i].y, false)) {
              wally2.y -= 5;}
                          return;
    That's not working either.

  • Animated GIF image gets distorted while playing.

    Hi,
    I have some animated gif images which I need to show in a jLabel and a jTextPane. But some of these images are getting distorted while playing in the two components, though these images are playing properly in Internet Explorer. I am using the methods insertIcon() of jTextPane and setIcon() of jLabel to add or set the gif images in the two components. Can you please suggest any suitable idea of how I can get rid of this distortion? Thanks in advance.

    In the code below is a self contained JComponent that paints a series of BufferedImages as an animation. You can pause the animation, and you specify the delay. It also has two static methods for loading all the frames from a File or a URL.
    Feel free to add functionality to it, like the ability to display text or manipulate the animation. You may wan't the class to extend JLabel instead of JComponent. Just explore around with the painting. If you have any questions, then feel free to post.
    The downside to working with an array of BufferedImages, though, is that they consume more memory then a single Toolkit gif image.
    import javax.swing.JComponent;
    import java.awt.image.BufferedImage;
    import java.awt.Graphics;
    import javax.imageio.ImageIO;
    import javax.imageio.ImageReader;
    import javax.imageio.stream.ImageInputStream;
    public class JAnimationLabel extends JComponent {
        /**The default animation delay.  100 milliseconds*/
        public static final int DEFAULT_DELAY = 100;
        private BufferedImage[] images;
        private int currentIndex;
        private int delay;
        private boolean paused;
        private boolean exited;
        private final Object lock = new Object();
        //the maximum image width and height in the image array
        private int maxWidth;
        private int maxHeight;
        public JAnimationLabel(BufferedImage[] animation) {
            if(animation == null)
                throw new NullPointerException("null animation!");
            for(BufferedImage frame : animation)
                if(frame == null)
                    throw new NullPointerException("null frame in animation!");
            images = animation;
            delay = DEFAULT_DELAY;
            paused = false;
            for(BufferedImage frame : animation) {
                maxWidth = Math.max(maxWidth,frame.getWidth());
                maxHeight = Math.max(maxHeight,frame.getHeight());
            setPreferredSize(new java.awt.Dimension(maxWidth,maxHeight));
        //This method is called when a component is connected to a native
        //resource.  It is an indication that we can now start painting.
        public void addNotify() {
            super.addNotify();
            //Make anonymous thread run animation loop.  Alternative
            //would be to make the AnimationLabel class extend Runnable,
            //but this would allow innapropriate use.
            exited = false;
            Thread runner = new Thread(new Runnable() {
                public void run() {
                    runAnimation();
            runner.setDaemon(true);
            runner.start();
        public void removeNotify() {
            exited = true;
            super.removeNotify();
        /**Returns the animation delay in milliseconds.*/
        public int getDelay() {return delay;}
        /**Sets the animation delay between two
         * consecutive frames in milliseconds.*/
        public void setDelay(int delay) {this.delay = delay;}
        /**Returns whether the animation is currently paused.*/
        public boolean isPaused() {
            return exited?true:paused;}
        /**Makes the animation paused or resumes the painting.*/
        public void setPaused(boolean paused) {
            synchronized(lock) {
                this.paused = paused;
                lock.notify();
        private void runAnimation() {
            while(!exited) {
                repaint();
                if(delay > 0) {
                    try{Thread.sleep(delay);}
                    catch(InterruptedException e) {
                        System.err.println("Animation Sleep interupted");
                synchronized(lock) {
                    while(paused) {
                        try{lock.wait();}
                        catch(InterruptedException e) {}
        public void paintComponent(Graphics g) {
            if(g == null) return;
            java.awt.Rectangle bounds = g.getClipBounds();
            //center image on label
            int x = (getWidth()-maxWidth)/2;
            int y = (getHeight()-maxHeight)/2;
            g.drawImage(images[currentIndex], x, y,this);
            if(bounds.x == 0 && bounds.y == 0 &&
               bounds.width == getWidth() && bounds.height == getHeight()) {
                 //increment frame for the next time around if the bounds on
                 //the graphics object represents a full repaint
                 currentIndex = (currentIndex+1)%images.length;
            }else {
                //if partial repaint then we do not need to
                //increment to the the next frame
    }

  • Hi Chris -- follow up to my question about using TSQ to store strings of different sizes

    Thanks for your response.
    I did read about those method you mentioned. I have some troubles with each method:
    1/ Using TSQ as byte stream.
    This is what I chose to use. I basically write to the queue the way you described with an exception about the number of byte to write. I did as followed:
    CmtWriteTSQData (tsqHandle, buffer, strlen (buffer),TSQ_INFINITE_TIMEOUT, NULL);
    with buffer as the buffer containing my string. Note that strlen(buffer) is not same each time. Also a thread is doing the writing to the queue and another thread is doing the reading. This leads to my next question: How do you read these strings out?
    Right now I am reading one
    byte at a time with:
    while (1)
    CmtReadTSQData (tsqHandle, tempbuf, 1, 10, 0);
    in a loop, with tempbuf to contain this single char, and then store it in another buffer until I read out a CR of LF which signals the end of a string.
    Will I have any problem?
    Could you please provide an alternative?
    2/ Using TSQ to contain pointers to strings.
    I haven't tried this method since I think it requires allocation of rather large static array of buffer and also requires keeping track of these pointer in a link list.
    Would you elaborate how you would use TSQ this way in my case.
    3/ Lastly, the way I described in (1) works only if I have the main thread to do writing, and another thread to do reading. Some how it doesn't work when I used one thread to do writing, one thread to do reading, and the main thread to handle user interface. I found out that the program spends all its time in the reading thread (inside the while loop).
    Why is it different if the writ
    ing thread is the main thread? Do I miss something like priority,... or anything like that?
    Thank you so much.

    You really should consider using event driven reading. There is examples of this in the Multithreading examples in cvi\samples\utility\Threading. Then you will get an event in the reader thread whenever a certain number of items are available to read. If you use the byte stream method, you should send the message length with each method so you know how to package the messages back on the reader side.
    For the pointer method, you would malloc the buffer on the writer side, send the pointer to the reader, then the reader would free the memory when it is done with the data.
    I don't understand why what you are describing in 3 occurs. If you aren't setting priority to something other than default, then each thread should get time. If you want to free up time i
    n a thread that is taking to much, just put a small Delay in that thread.
    If you want more help on this, you can look at the examples I mentioned above, read the Multithreading Overview available in PDF form in the cvi\bin directory or contact NI support at http://www.ni.com/ask.
    Best Regards,
    Chris Matthews
    Measurement Studio Support Manager

  • NTLM is not working with EP 6 SP 9 on Windows 2003 with IIS 6.

    I installed EP 6 SP 9 on windiows 2003 server with IIS version 6.
    Configures IisProxy.xml for redirection for filter irj. When  I make a call to default website, it in turn calls server with irj filter.
    Portal page comes up and requesting me to enter user id password.
    I made the changes mentioned by some of the web logs in this site.
    I configured HeaderVariableLoginModule an and added as explined by Gregory Wolf on the following topic.
    Integrated Windows Authentication with SAP EP 6.0 SP 3 and higher.
    I see following log from Ep 6 SP 9 log file security.log from directory E:\usr\sap\DEV\JC00\j2ee\cluster\server0\log\system.
    security#Plain###No user name provided.#
    #1.5#000C2953326B00430000000100000A780003F358EF2132DE#1111988099323#/System/Security#sap.com/irj#com.sap.engine.services.security#Guest#18####200d0cb09f4b11d9926a000c2953326b#SAPEngine_Application_Thread[impl:3]_37##0#0#Info#1#com.sap.engine.services.security#Plain###Cannot log info about the logon attempt because the user name is null.#
    #1.5#000C2953326B00440000000000000A780003F3591D22E168#1111988846027#/System/Security#sap.com/irj#com.sap.engine.services.security#Guest#18####dd1f09b19f4c11d98e98000c2953326b#SAPEngine_Application_Thread[impl:3]_7##0#0#Info#1#com.sap.engine.services.security#Plain###No user name provided.#
    #1.5#000C2953326B00440000000100000A780003F3591D22E215#1111988846027#/System/Security#sap.com/irj#com.sap.engine.services.security#Guest#18####dd1f09b19f4c11d98e98000c2953326b#SAPEngine_Application_Thread[impl:3]_7##0#0#Info#1#com.sap.engine.services.security#Plain###Cannot log info about the logon attempt because the user name is null.#
    #1.5#000C2953326B00450000000000000A780003F359227DE92E#1111988935662#/System/Security#sap.com/irj#com.sap.engine.services.security#Guest#18####128c40e09f4d11d9acb7000c2953326b#SAPEngine_Application_Thread[impl:3]_28##0#0#Info#1#com.sap.engine.services.security#Plain###No user name provided.#
    #1.5#000C2953326B00450000000100000A780003F359227DEDC7#1111988935662#/System/Security#sap.com/irj#com.sap.engine.services.security#Guest#18####128c40e09f4d11d9acb7000c2953326b#SAPEngine_Application_Thread[impl:3]_28##0#0#Info#1#com.sap.engine.services.security#Plain###Cannot log info about the logon attempt because the user name is null.#
    Lots of weblogs are pointing to remote_user value in IisProxy.log file. I am not able to see that.
    I also tried switching IIS 6 to run as IIS 5 and did not help much at all.
    Please help me on the issue.
    I did not change authschemes.xml file.
    My IisProxy.xml file looks as follows:
    <?xml version="1.0" encoding="utf-8" ?>
    <!DOCTYPE ISAPI-config[
         <!ELEMENT ISAPI-config ( filter, extension, ( mapping | config )* )>
         <!ATTLIST ISAPI-config
              version CDATA #REQUIRED
         >
         <!ELEMENT filter (log-path?)>
         <!ATTLIST filter
              name CDATA #IMPLIED
              log-level CDATA "3"
              log-flags CDATA "0x00000001"
              debug-flags CDATA "0x00008000"
              priority ( high | medium | low ) "high"
              extension-url CDATA "/scripts/IisProxy.dll"
              authentication ( skip | normal | forward ) "normal"
              remote-address ( skip | forward ) "skip"
         >
         <!ELEMENT extension (
              keystore-dir?,
              log-path?,
              data-path?,
              trace-path? )>
         <!ATTLIST extension
              name CDATA #IMPLIED
              log-level CDATA "1"
              log-flags CDATA "0"
              debug-flags CDATA "0"
              access ( filter | direct | both ) "filter"
         >
         <!ELEMENT keystore-dir (#PCDATA)>
         <!ELEMENT log-path (#PCDATA)>
         <!ELEMENT data-path (#PCDATA)>
         <!ELEMENT trace-path (#PCDATA)>
         <!ELEMENT mapping (
              source+,
              target,
              compress-types*,
              protocol-header?,
              certificate-header?,
              cert-chain-header?,
              cipher-header?,
              keysize-header?,
              keystore-path?,
              log-path?,
              data-path? )>
         <!ATTLIST mapping
              name CDATA #IMPLIED
              log-level CDATA "1"
              log-flags CDATA "0"
              debug-flags CDATA "0"
              keep-alive ( true | false ) "true"
              use-continue ( true | false ) "true"
              close-socket ( true | false ) "true"
              close-socket-delay CDATA "1000"
              thread-count CDATA "100"
              max-socket-age CDATA "37"
         >
         <!ELEMENT source (protocol, host?, port?, prefix, new-prefix?)>
         <!ATTLIST source
              access ( filter | direct | both ) "filter"
         >
         <!ELEMENT protocol (#PCDATA)>
         <!ELEMENT host (#PCDATA)>
         <!ELEMENT port (#PCDATA)>
         <!ELEMENT prefix (#PCDATA)>
         <!ELEMENT new-prefix (#PCDATA)>
         <!ELEMENT target (protocol, host, port)>
         <!ELEMENT compress-types (#PCDATA)>
         <!ATTLIST compress-types
              min-size CDATA "1024"
         >
         <!ELEMENT protocol-header (#PCDATA)>
         <!ELEMENT certificate-header (#PCDATA)>
         <!ELEMENT cert-chain-header (#PCDATA)>
         <!ELEMENT cipher-header (#PCDATA)>
         <!ELEMENT keysize-header (#PCDATA)>
         <!ELEMENT keystore-path (#PCDATA)>
         <!ELEMENT config ( source+ )>
    ]>
    <ISAPI-config version="1.6">
         <filter name="IisProxy filter"/>
         <extension name="IisProxy extension" />
         <mapping name="IisProxy samples">
              <source>
                   <protocol>http</protocol>
                   <prefix>/irj</prefix>
              </source>
              <source>
                   <protocol>http</protocol>
                   <prefix>/Hello/</prefix>
              </source>
              <source>
                   <protocol>http</protocol>
                   <prefix>/Hello2/</prefix>
                   <new-prefix>/Hello/</new-prefix>
              </source>
              <target>
                   <protocol>http</protocol>
                   <host>slcsepw04vd.pacificorp.us</host>
                   <port>50000</port>
              </target>
              <compress-types>text/html, text/plain</compress-types>
         </mapping>
         <mapping name="Secure IisProxy samples">
              <source>
                   <protocol>https</protocol>
                   <prefix>/Hello/</prefix>
              </source>
              <target>
                   <protocol>https</protocol>
                   <host>localhost.your.corp</host>
                   <port>8443</port>
              </target>
              <keystore-path>c:\sec\SAPSSLC.pse</keystore-path>
         </mapping>
         <config>
              <source>
                   <protocol>http</protocol>
                   <host>localhost</host>
                   <prefix>/IisProxy</prefix>
              </source>
              <source>
                   <protocol>https</protocol>
                   <host>localhost</host>
                   <prefix>/IisProxy</prefix>
              </source>
         </config>
    </ISAPI-config>
    Please help me. I am not sure what is missing. Please make a note that Portal version is EP 6 SP9 & Server is Windows 2003 with IIS 6.

    I made the change as you requested and it did not help.
    I do not see any remote_user entry in IisProxy.log file.
    Please let me know the procedure to get REMOTE_USER into the IisProxy.log file.
    <?xml version="1.0" encoding="utf-8" ?>
    <!DOCTYPE ISAPI-config[
         <!ELEMENT ISAPI-config ( filter, extension, ( mapping | config )* )>
         <!ATTLIST ISAPI-config
              version CDATA #REQUIRED
         >
         <!ELEMENT filter (log-path?)>
         <!ATTLIST filter
              name CDATA #IMPLIED
              log-level CDATA "3"
              log-flags CDATA "0x00000001"
              debug-flags CDATA "0x00008000"
              priority ( high | medium | low ) "high"
              extension-url CDATA "/scripts/IisProxy.dll"
              authentication ( skip | normal | forward ) "normal"
              remote-address ( skip | forward ) "skip"
         >
         <!ELEMENT extension (
              keystore-dir?,
              log-path?,
              data-path?,
              trace-path? )>
         <!ATTLIST extension
              name CDATA #IMPLIED
              log-level CDATA "1"
              log-flags CDATA "0"
              debug-flags CDATA "0"
              access ( filter | direct | both ) "filter"
         >
         <!ELEMENT keystore-dir (#PCDATA)>
         <!ELEMENT log-path (#PCDATA)>
         <!ELEMENT data-path (#PCDATA)>
         <!ELEMENT trace-path (#PCDATA)>
         <!ELEMENT mapping (
              source+,
              target,
              compress-types*,
              protocol-header?,
              certificate-header?,
              cert-chain-header?,
              cipher-header?,
              keysize-header?,
              keystore-path?,
              log-path?,
              data-path? )>
         <!ATTLIST mapping
              name CDATA #IMPLIED
              log-level CDATA "1"
              log-flags CDATA "0"
              debug-flags CDATA "0"
              keep-alive ( true | false ) "true"
              use-continue ( true | false ) "true"
              close-socket ( true | false ) "true"
              close-socket-delay CDATA "1000"
              thread-count CDATA "100"
              max-socket-age CDATA "37"
         >
         <!ELEMENT source (protocol, host?, port?, prefix, new-prefix?)>
         <!ATTLIST source
              access ( filter | direct | both ) "filter"
         >
         <!ELEMENT protocol (#PCDATA)>
         <!ELEMENT host (#PCDATA)>
         <!ELEMENT port (#PCDATA)>
         <!ELEMENT prefix (#PCDATA)>
         <!ELEMENT new-prefix (#PCDATA)>
         <!ELEMENT target (protocol, host, port)>
         <!ELEMENT compress-types (#PCDATA)>
         <!ATTLIST compress-types
              min-size CDATA "1024"
         >
         <!ELEMENT protocol-header (#PCDATA)>
         <!ELEMENT certificate-header (#PCDATA)>
         <!ELEMENT cert-chain-header (#PCDATA)>
         <!ELEMENT cipher-header (#PCDATA)>
         <!ELEMENT keysize-header (#PCDATA)>
         <!ELEMENT keystore-path (#PCDATA)>
         <!ELEMENT config ( source+ )>
    ]>
    <ISAPI-config version="1.6">
         <filter name="IisProxy filter" authentication="forward"/>
         <extension name="IisProxy extension" />
         <mapping name="IisProxy samples">
              <source>
                   <protocol>http</protocol>
                   <prefix>/irj</prefix>
              </source>
              <source>
                   <protocol>http</protocol>
                   <prefix>/Hello/</prefix>
              </source>
              <source>
                   <protocol>http</protocol>
                   <prefix>/Hello2/</prefix>
                   <new-prefix>/Hello/</new-prefix>
              </source>
              <target>
                   <protocol>http</protocol>
                   <host>slcsepw04vd.pacificorp.us</host>
                   <port>50000</port>
              </target>
              <compress-types>text/html, text/plain</compress-types>
         </mapping>
         <mapping name="Secure IisProxy samples">
              <source>
                   <protocol>https</protocol>
                   <prefix>/Hello/</prefix>
              </source>
              <target>
                   <protocol>https</protocol>
                   <host>localhost.your.corp</host>
                   <port>8443</port>
              </target>
              <keystore-path>c:secSAPSSLC.pse</keystore-path>
         </mapping>
         <config>
              <source>
                   <protocol>http</protocol>
                   <host>localhost</host>
                   <prefix>/IisProxy</prefix>
              </source>
              <source>
                   <protocol>https</protocol>
                   <host>localhost</host>
                   <prefix>/IisProxy</prefix>
              </source>
         </config>
    </ISAPI-config>
    Please let me know what is missing.
    Thanks.

  • Sorry, a serious error has occured that requires Adobe Premiere elements to shut down. We wil attempt to save your current project. This error occures when Im adding a .mov movie.

    Hello everybody
    I have a new laptop and when I want to add a .mov movie to Adobe premiere elements, this error occures. Im trying to solve this problem now for days but I dont know how to continue. Im working with Windows XP, Version 2002, T2250, 0.99 RAM and an old Premiere elements 2004 version.
    On my old computer I was able to add this same .mov movies, but not on the new one.
    I also tried to convert this .mov movies, but the quality was to bad...
    Does anybody know this problem? Im appreciating every little advice and help.
    Thanks a lot
    Sabine

    Sabine
    Sorry for all the delays getting your thread moving forward. I suspect that it got lost in the daily thread traffic and Adobe's major updating of the forums.
    Do your issues still exist. If they are the same as when you posted on May 8th, then
    1. When you used HandBrake for the converslion of your .mov file, did you leave the Container = Mp4. And under Video Tab, did you set the Videc Codec = H.264 (x264)? All you needed to do at that point was dot the Constant for the frame rate and designate a frame rate and select the Start button and wait for the Queue Finished message in the progress bar at the bottom left of the HandBrake workspace.
    2. What model iPhone is the video coming from? Your iPhone is probably giving you HD video (probably 1080p). So increasing the computer's installed RAM from 2.00 to 4 GB would be expected to help the overall workflow. Only if you have a 64 bit computer operating system, 8 GB installed would be even better. The 4 GB installed RAM is the maximum supported by a 32 bit computer operating system.
    3. Specially for
    The movie is stopping and jumping.
    When you are playing back the Timeline content, are you looking at the "rendered Timeline"? Is there an red line over the content during that playback? If so, press the Enter key and wait for the render process to complete. This rendering process gives you the best possible preview of what you are seeing. The red  line could be due to your editing the content, or it could be due to an incorrect selection of project settings. If you supply information about your video properties, we can suggest the best possible project settings. I do not recall seeing that you mentioned what version of Premiere Elements that you are using 1, 2, 3, 4 or other?
    Please review the above and then let me know what supplemental information and/or clarification would help.
    Thank you.
    ATR

Maybe you are looking for