Changing images on a random path

Is it possible to have an image cross the screen slowly on a random path for say 10 seconds, then have another image replace it and go across on another random path? i will have maybe 15 images in toal that I want to do this with!
Thanks

Yes, though a random path may not get you across the screen.  You'll need to decide on how you want the random path to be defined.

Similar Messages

  • Automator - Change Image Type - Multiple page PDF- TIFF conversion

    I was able to do this on a friend's computer (not sure which version of OS X they were running), but this seems impossible on Snow Leopard.
    I need to convert hundreds of multiple page PDFs to TIFFs. I can't get this to work, and the Change Image Type option only lists single page PDF conversion. I could separate PDFs into multiple files, convert to TIFFs, but then I don't know how to recombine a bunch of TIFF pages into a larger file. From google searches, I know this is possible using tiffutil, but I don't really understand how to use that well, and I really need an automatic process.
    I'm at my wits end with this, because I did it just last week on someone else's computer and it was easy as pie. Why can't you convert multiple page PDFs in Snow Leopard?
    Any ideas?
    Thanks!

    I just tried this - two problems.
    It creates a separate tiff document for each page of the input pdf.
    Also, this action is just annoying because it results in randomly named files in some temp folder that i can only locate using the reveal finder item action. I know I can rename files in automator, but I'd really like to have the output file have the same name as the input file.
    It confuses me why they would remove this functionality in Snow Leopard.

  • Dreamweaver template won't change images

    I am using Dreamweaver 5 on a Macbook Pro and I have been trying to change the Header image in my site.  I would go in and change the image using the CSS panel but the image itself will not update.  I've tried deleting the old site definitions and recreating them only to have the same problem.
    Nothing will change on my template. It won't aknowledge my changed image "i have saved it under the same image name". i've tried changing the name of the image, re-loading it and still THE OLD IMAGE APPEARS!. What the heck is going on? Can someone please tell me where it is getting this image from when I have clearly changed the image, looked at image to confirm it is in fact the changed image prior to attaching it. 
    I am completely puzzled and Desperate as my client expects these changes. Thank you.  In the mean time I will try to just upload the changed image to the web and hope the template uses the updated image on the server.
    Thank you for any help you can offer.

    Dreamweaver 5 means Dreamweaver CS5 correct? Can you give us a bit more info on your workflow? How's your site set up? Where does this image reside in comparison to the root of the site folder (make sure the image gets saved to the site folder)? Is the file path to the image correct? Make sure to turn live view off and back on again?

  • How do you change the color of the path the pen tool makes?

    There must be some way to change the color of the path the pen tool makes from that grey color to something that will contrast with the image underneath. I found one thread about this from 2010 or so and the answer led to a dead link. This seems like it would be a very helpful feature that would be easy to implement. Someone please tell me in 2014, after a zillion version of photoshop have come out in the past 30 or so years, how do we do this? Thank in advance.

    Why? When you zoom in too close sometimes it become too pixelated to see what's going on and the point on the pen become to close to each other. Why can't you change the path to a color so that it doesn't blend into the image you're trying to trace? Why is the unchangeable color one of the most likely colors to become invisible on most images? So frustrating!

  • How to change Images with ImageIcon

    Hello everyone, this is my first post on the forums.
    I am struggling at the moment to find a way to change images in my program. I am making a card game and when the user clicks a button it will replace the card he has with another card. I thought the following code would work but apparently it doesnt:
    String cardPathA = "image1.gif";
    ImageIcon imageCardA = new ImageIcon(cardPathA);   //cardPathA for example is image1.gif
    //during the program the user changes cards so it should now show image2.gif
    cardPathA = "image2.gif";
    imageCardA.setImage(cardPathA);The error occurs when compiling and it reads: "+setImage(java.awt.Image) in javax.swing.ImageIcon cannot be applied to (java.langlString)+".
    I have searched all over the internet and I haven't found anything. I would appreciate some help. Thanks :)

    im not really sure i made a quick example to show how I would change the imageIcon in a button, just change the paths for cardPathA and cardPathB for your pictures to get it working.
    The only other thing i can think of is maybe to call repaint() for the components you are trying to change the image?
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    class ImageChange extends JFrame implements ActionListener{
             final private String cardPathA;
            final private String cardPathB;
         private ImageIcon myImageIcon;
            private JButton changeCard;
            private int counter;
            private JPanel panel;
            private JButton imageButton;
         public ImageChange(){       
                changeCard = new JButton("Change Button");
                counter = 0;
                cardPathA = "1.gif";
                cardPathB = "2.gif";
                myImageIcon = new ImageIcon(cardPathA);
                imageButton = new JButton(myImageIcon);
            public void makeGui(){
                changeCard.addActionListener(this);
                panel = new JPanel(new BorderLayout());
                panel.add(changeCard,BorderLayout.NORTH);
                panel.add(imageButton,BorderLayout.CENTER);
                this.add(panel);
                this.setDefaultCloseOperation(this.EXIT_ON_CLOSE);
                this.pack();
                this.setVisible(true);
         public void actionPerformed (ActionEvent menuChoice){
                counter++;
                if(counter%2 ==0){             
                    myImageIcon = new ImageIcon(cardPathA);
                    imageButton.setIcon(myImageIcon);
                }else{
                    myImageIcon = new ImageIcon(cardPathB);
                    imageButton.setIcon(myImageIcon);
            public static void main(String[] args){
                ImageChange test = new ImageChange();
                test.makeGui();
    }Calypso

  • Image display - How do I display an image using an absolute path?

    How do I display an image using an absolute path in a compiled WebHelp?
    Our developers use RH8 map IDs within our in-house applications to display in a model window created using Telerik Rad Window.
    Unfortunately images disappear from these model windows because RoboHelp removes absolute links to [inserted] images and changes them to relative in the compiled WebHelp.
    How do we overcome this? Is there a solution in RH8?

    I have tried again and changed the path in the topic HTML
    from : ..\..\HelpTopics\Icon_Search.png
    to    :  \HowDoI\Help_CMS\WebHelp\HelpTopics\Icon_Search.png
    I am obviously unable to see it in RH8 as I have removed the relative link so it is "outside" of the project.
    This time, on compilation, it has not stripped out the absolute links. The developer was working with me on this last week and we did have any issue in that they did not hold the absolute link. Most odd!
    Checking the published help it appears to be working in the application, which is great.
    So my apologies for raising the issue but it really did not work last week.

  • Change image size on list Field

    I have list library which has column of "Person or Group" and selected "Name with (picture)".  But i cant change image Size there. its always 62x62. How can i change it?
    any idea?
    Regards,
    Lasantha

    How exactly are you wanting to change it? height and width should just be attributes in the element... so.. probably the most simple (but not exactly elegant) way to handle this is to use jQuery.
    If you drop the following script into a Content Editor Web Part on your page, it will resize all the profile pics to 100x100.  (change the numbers to the size you want):
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
    <script type="text/javascript">
    jQuery(document).ready(function($){
    $("img[width='62']").each(function()
    $(this).attr("width","100");
    $(this).attr("height","100");
    </script>
    Some Caveats:
    1) This script resizes ALL images that have a width of 62. So, if you have some other random image on your page that is 62px wide, it will find it and resize as well.
    2) I'm references the jQuery library externally which I do not usually recommend, but at least you can drop this script in and it should just work.  
    Again, not elegant, and I'm sure someone smarter than me can improve on it, but it should at least get you what you need.
    Good luck!
    Mark

  • Changing Images at Runtime...it's sending me nuts (I'm a newbie, go easy)

    Hi all,
    I am trying change images at runtime and quite frankly it's driving me nuts. I'm pretty new to Java and don't understand some of the principles but I'm trying. I have this code below, that loads up a few images. I want to be able to change some/all of these images either on a timed even or on a button press, but all the things I've tried don't work. Can someone offer me some help....thanks in advance
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class bc extends JFrame implements ActionListener {
         public static void main(String[] args) {new bc();}
         bc() {
              //setUndecorated(true); // - this removed the titlebar!
                    setTitle("BC...");
              setSize(350,125);
              setResizable(false);
              setLocation(50,50);
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              setBackground(new Color(0,0,0));
              getContentPane().setBackground(new Color(255,255,255));
              JPanel hours = new JPanel();
              hours.setLayout(new GridLayout(4,2));
              hours.add(hour14);
              hours.add(hour24);
              hours.add(hour13);
              hours.add(hour23);
              hours.add(hour12);
              hours.add(hour22);
              hours.add(hour11);
              hours.add(hour21);
              JPanel mins = new JPanel();
              mins.setLayout(new GridLayout(4,2));
              mins.add(min14);
              mins.add(min24);
              mins.add(min13);
              mins.add(min23);
              mins.add(min12);
              mins.add(min22);
              mins.add(min11);
              mins.add(min21);
              JPanel secs = new JPanel();
              secs.setLayout(new GridLayout(4,2));
              secs.add(sec14);
              secs.add(sec24);
              secs.add(sec13);
              secs.add(sec23);
              secs.add(sec12);
              secs.add(sec22);
              secs.add(sec11);
              secs.add(sec21);
              JPanel helptext = new JPanel();
              helptext.setLayout(new GridLayout(4,2));
              helptext.add(new JLabel("8"));
              helptext.add(new JLabel("4"));
              helptext.add(new JLabel("2"));
              helptext.add(new JLabel("1"));
    //add action listenters
              changeImg.addActionListener(this);
              JPanel cp = new JPanel();
              cp.setLayout(new GridLayout(1,6));
              cp.setBackground(new Color(255,255,255));
              cp.add(hours);
              cp.add(mins);
              cp.add(secs);
              cp.add(helptext);
              cp.add(changeImg);
              setContentPane(cp);
              setVisible(true);
         public void actionPerformed(ActionEvent ae) {
              hour11.PaintOff(1);
              //JOptionPane.showMessageDialog(this, "changed");
              repaint();
    JPanel hour11 = new PaintOff(0);
    JPanel hour12 = new PaintOff(0);
    JPanel hour13 = new PaintBlank();
    JPanel hour14 = new PaintBlank();
    JPanel hour21 = new PaintOff(0);
    JPanel hour22 = new PaintOff(0);
    JPanel hour23 = new PaintBlank();
    JPanel hour24 = new PaintBlank();
    JPanel min11 = new PaintOff(0);
    JPanel min12 = new PaintOff(0);
    JPanel min13 = new PaintOff(0);
    JPanel min14 = new PaintOff(0);
    JPanel min21 = new PaintOff(0);
    JPanel min22 = new PaintOff(0);
    JPanel min23 = new PaintOff(0);
    JPanel min24 = new PaintOff(0);
    JPanel sec11 = new PaintOff(0);
    JPanel sec12 = new PaintOff(0);
    JPanel sec13 = new PaintOff(0);
    JPanel sec14 = new PaintOff(0);
    JPanel sec21 = new PaintOff(0);
    JPanel sec22 = new PaintOff(0);
    JPanel sec23 = new PaintOff(0);
    JPanel sec24 = new PaintOff(0);
    JButton changeImg = new JButton("change");
    }///---------This is my PaintOff class ---------------\\\
    import javax.swing.*;
    import java.awt.*;
    import java.awt.Image.*;
    public class PaintOff extends JPanel {
    Toolkit tk = Toolkit.getDefaultToolkit();
    public Image imgOff = tk.getImage("off.jpg");
    public Image imgOn = tk.getImage("on.jpg");
    public Image paintMe = tk.getImage("off.jpg");
         PaintOff(int a) {
              if(a == 1) {
                   vOn();
              } else {
                   vOff();
         public void vOn() {
            paintMe = imgOn;
         //JOptionPane.showMessageDialog(new bc(), "shown");
         public void vOff() {
            paintMe = imgOff;
         public void paintComponent(Graphics g) {
              g.drawImage(paintMe,0,0,this);
    }PaintBlank class is not included here, it's basically just the same as PaintOff but only has one image inside.
    When I try and compile this code, I get
    C:\jdk1.4\bin\bclock>javac bc.java
    bc.java:79: cannot resolve symbol
    symbol : method PaintOff (int)
    location: class javax.swing.JPanel
    hour11.PaintOff(1);
    ^
    1 error
    I don't understand this either, I've tried replacing "PaintOff(1)" with "vOn()" but I get the same error. This is baffling to be, as I thought that the hour11 would have access to all the methods inside the PaintOff class?
    Anyway, thanks for any help you guys give me!
    Cheers
    //Chris.

    Hi!
    Your problem is that you've used a widening conversion to convert from PaintOff to a JPanel. JPanel has no such method, and so the compiler is complaining that it can't find it.
    e.g
    public class NoCompile{
         public static void main(String args[]){
              One one = new Two();
              one.methTwo();
    public class Two extends One{
         public Two(){}
         public void methTwo(){
            System.out.println("Executed 2");
    public class One{
         public One(){}
         public void meth1(){}
    } will give you the same sort of error message. To make the compiler happy, use a cast.
    Now this will compile and gives the right result.
    public class NoCompile{
         public static void main(String args[]){
              One one = new Two();
              ((Two)one).methTwo();
    }So in your case, you want to do
    ((PaintOff)hour11).vOn();
    Does that help?
    :) jen

  • Photoshop Elements 5.0 - won't let me change image aspect ratio. Box is greyed out. Have reinstalled

    I've been using Photoshop Elements 5.0 for years.  As of today, it won't let me change image aspect ratio. Box is greyed out. Have reinstalled the program with no change

    Where in photoshop elements 5 are you seeing the "Box" geyed out?
    Or how are you trying to change the image aspect ratio?

  • Filter plugin. Problem after change image depth.

    Hi All !
    I already wrote filter plugin it work fine but only for image depth 8bit, after i change image depth on 16 or 32 bits I getting error msg box from photoshop.
    I try change on 'destination.colBits = 8' or 'destination.colBits = pChannel->depth' or ' (pChannel->bounds.bottom - pChannel->bounds.top) * pChannel->depth;'  but all the same.
    PixelMemoryDesc destination;
    destination.data = data; //*pixel
    destination.depth = pChannel->depth;
    destination.rowBits = (pChannel->bounds.right - pChannel->bounds.left) * pChannel->depth;
    destination.colBits = 8;
    destination.bitOffset = 0 ;
    Please help someone !
    Very Thanks in Advance !
    All code below:
    //  Gauss.cpp
    //  gauss
    //  Created by Dmitry Volkov on 30.12.14.
    //  Copyright (c) 2014 Automatic System Metering. All rights reserved.
    #include "Gauss.h"
    #include "GaussUI.h"
    #include "FilterBigDocument.h"
    #include <fstream>
    using namespace std;
    SPBasicSuite* sSPBasic = NULL;
    FilterRecord* gFilterRecord = NULL;
    PSChannelPortsSuite1* sPSChannelPortsSuite = NULL;
    PSBufferSuite2* sPSBufferSuite64 = NULL;
    int16* gResult = NULL;
    void DoParameters ();
    void DoPrepare ();
    void DoStart ();
    void DoFinish ();
    void DoEffect();
    void GaussianBlurEffect(ReadChannelDesc* pChannel, char* data);
    void ReadLayerData(ReadChannelDesc* pChannel, char* pLayerData);
    void WriteLayerData(ReadChannelDesc* pChannel, char* pLayerData);
    DLLExport MACPASCAL void PluginMain(const int16 selector,
                                        FilterRecordPtr filterRecord,
                                        intptr_t * data,
                                        int16 * result)
        sSPBasic = filterRecord->sSPBasic;
        gFilterRecord = filterRecord;
        gResult = result;
        try {
                if (sSPBasic->AcquireSuite(kPSChannelPortsSuite,
                                                   kPSChannelPortsSuiteVersion3,
                                                   (const void **)&sPSChannelPortsSuite))
                    *gResult = errPlugInHostInsufficient;
                if (sSPBasic->AcquireSuite( kPSBufferSuite,
                                                   kPSBufferSuiteVersion2,
                                                   (const void **)&sPSBufferSuite64))
                    *gResult = errPlugInHostInsufficient;
                if (sPSChannelPortsSuite == NULL || sPSBufferSuite64 == NULL)
                    *result = errPlugInHostInsufficient;
                    return;
                switch (selector)
                    case filterSelectorParameters:
                        DoParameters();
                        break;
                    case filterSelectorPrepare:
                        DoPrepare();
                        break;
                    case filterSelectorStart:
                        DoStart();
                        break;
                    case filterSelectorFinish:
                        DoFinish();
                        break;
        catch (...)
            if (NULL != result)
                *result = -1;
    void DoParameters ()
    void DoPrepare ()
    void DoStart ()
        if (*gResult == noErr)
            if (doUi())
                DoEffect();
    void DoFinish ()
    #define defColBits 8
    void DoEffect()
        // Start with the first target composite channel
        ReadChannelDesc *pChannel = gFilterRecord->documentInfo->targetCompositeChannels;
        // Calculation width and height our filter window
        int32 width = pChannel->bounds.right - pChannel->bounds.left;
        int32 height = pChannel->bounds.bottom - pChannel->bounds.top;
        fstream logFile ("/Volumes/Macintosh Media/GaussLogFile.txt", ios::out);
        logFile << endl << "top " << pChannel->bounds.top;
        logFile << endl << "bottom " << pChannel->bounds.bottom;
        logFile << endl << "left " << pChannel->bounds.left;
        logFile << endl << "right " << pChannel->bounds.right;
        logFile << endl << "depth " << pChannel->depth;
        logFile << endl << "vRes " << gFilterRecord->documentInfo->vResolution;
        logFile << endl << "hRes " << gFilterRecord->documentInfo->hResolution;
        // Get a buffer to hold each channel as we process. Note we can using standart malloc(size_t) or operator new(size_t)
        // functions, but  Adobe recommend sPSBufferSuite64->New() for memory allocation
        char *pLayerData = sPSBufferSuite64->New(NULL, width*height*pChannel->depth/8);
        if (pLayerData == NULL)
            return;
        // we may have a multichannel document
        if (pChannel == NULL)
            pChannel = gFilterRecord->documentInfo->alphaChannels;
        // Loop through each of the channels
        while (pChannel != NULL && *gResult == noErr)
            ReadLayerData(pChannel, pLayerData);
            GaussianBlurEffect(pChannel, pLayerData);
            WriteLayerData(pChannel, pLayerData);
            // off to the next channel
            pChannel = pChannel->next;
        pChannel = gFilterRecord->documentInfo->targetTransparency;
        // Delete pLayerData
        sPSBufferSuite64->Dispose((char**)&pLayerData);
    void GaussianBlurEffect(ReadChannelDesc* pChannel, char *data)
        // Make sure Photoshop supports the Gaussian Blur operation
        Boolean supported;
        if (sPSChannelPortsSuite->SupportsOperation(PSChannelPortGaussianBlurFilter,
                                                    &supported))
            return;
        if (!supported)
            return;
        // Set up a local rect for the size of our port
        VRect writeRect = pChannel->bounds;
        PIChannelPort inPort, outPort;
        // Photoshop will make us a new port and manage the memory for us
        if (sPSChannelPortsSuite->New(&inPort,
                                      &writeRect,
                                      pChannel->depth,
                                      true))
            return;
        if (sPSChannelPortsSuite->New(&outPort,
                                      &writeRect,
                                      pChannel->depth,
                                      true))
            return;
        // Set up a PixelMemoryDesc to tell how our channel data is layed out
        PixelMemoryDesc destination;
        destination.data = data; //*pixel
        destination.depth = pChannel->depth;
        destination.rowBits = (pChannel->bounds.right - pChannel->bounds.left) * pChannel->depth;
        destination.colBits = defColBits;
        destination.bitOffset = 0 ;
        // Write the current effect we have into this port
        if (sPSChannelPortsSuite->WritePixelsToBaseLevel(inPort,
                                                         &writeRect,
                                                         &destination))
            return;
        // Set up the paramaters for the Gaussian Blur
        PSGaussianBlurParameters gbp;
        int inRadius = 1;
        Fixed what = inRadius << 16;
        gbp.radius = what;
        gbp.padding = -1;
        sPSChannelPortsSuite->ApplyOperation(PSChannelPortGaussianBlurFilter,
                                                                 inPort,
                                                                 outPort,
                                                                 NULL,
                                                                 (void*)&gbp,
                                                                 &writeRect);
        if (sPSChannelPortsSuite->ReadPixelsFromLevel(outPort,
                                                      0,
                                                      &writeRect,
                                                      &destination))
            return;
        // Delete the temp port in use
        sPSChannelPortsSuite->Dispose(&inPort);
        sPSChannelPortsSuite->Dispose(&outPort);
    void ReadLayerData(ReadChannelDesc *pChannel, char *pLayerData)
        // Make sure there is something for me to read from
        Boolean canRead;
        if (pChannel == NULL)
            canRead = false;
        else if (pChannel->port == NULL)
            canRead = false;
        else if (sPSChannelPortsSuite->CanRead(pChannel->port, &canRead))
            // this function should not error, tell the host accordingly
            *gResult = errPlugInHostInsufficient;
            return;
        // if everything is still ok we will continue
        if (!canRead || pLayerData == NULL)
            return;
        // some local variables to play with
        VRect readRect = pChannel->bounds;
        PixelMemoryDesc destination;
        // set up the PixelMemoryDesc
        destination.data = pLayerData;
        destination.depth = pChannel->depth;
        destination.rowBits = pChannel->depth * (readRect.right - readRect.left);
        destination.colBits = defColBits;
        destination.bitOffset = 0 ;
        // Read this data into our buffer, you could check the read_rect to see if
        // you got everything you desired
        if (sPSChannelPortsSuite->ReadPixelsFromLevel(
                                                      pChannel->port,
                                                      0,
                                                      &readRect,
                                                      &destination))
            *gResult = errPlugInHostInsufficient;
            return;
    void WriteLayerData(ReadChannelDesc *pChannel, char *pLayerData)
        Boolean canWrite = true;
        if (pChannel == NULL || pLayerData == NULL)
            canWrite = false;
        else if (pChannel->writePort == NULL)
            canWrite = false;
        else if (sPSChannelPortsSuite->CanWrite(pChannel->writePort, &canWrite))
            *gResult = errPlugInHostInsufficient;
            return;
        if (!canWrite)
            return;
        VRect writeRect = pChannel->bounds;
        PixelMemoryDesc destination;
        destination.data = pLayerData;
        destination.depth = pChannel->depth;
        destination.rowBits = pChannel->depth * (writeRect.right - writeRect.left); //HSIZE * pChannel->depth * gXFactor*2;
        destination.colBits = defColBits;
        destination.bitOffset = 0 ;
        if (sPSChannelPortsSuite->WritePixelsToBaseLevel(
                                                         pChannel->writePort,
                                                         &writeRect,
                                                         &destination))
            *gResult = errPlugInHostInsufficient;
            return;

    Have you reviewed your code vs the Dissolve example? It is enabled for other bit depths as well.

  • Menu Buttons Change Image instead of Highlighting?

    Does anyone know how to/or if it's possible to make a DVD menu in Photoshop for Encore where, when the menu button is highlighted it actually changes image instead of making it a solid highlighted colour?
    For example...
    In a DVD i'm making, I have Cartoon images that are the menu buttons. I would like to make it so that when you select it on your dvd player it makes the eyes open up wider and mouths of the characters open up. I have made the duplicate layers and changed one to have the open eyes and mouth and placed it directly ontop of the other and put both layers in the one group with the (+) to allow Encore to recognize it. But all I get is the top layer of the two turning to a top colour. I know that using prefixes like (=1) makes it highlighted and that is why it's highlighting but I don't know what else to suggest. I've looked at the prefixes on the Encore help on this site and tried to work it out but no luck
    I know this is due to my lack of knowledge and really need some help to fix it, or know if it's even possible (I assume tht using such great products as Adobe it will be)
    Thanx

    Welcome to the forum.
    This is easily done by doing dupe Menus for each Button. The Button on the original Menu will be set to Auto-Activate, and be linked to the dupe Menu with the different graphic. I would probably turn OFF Sub-picture Highlights.
    The trick is to do a layout, and also name your Menus (especially the dupes), to reflect exactly what they do. I use Illustrator for my layout, but pencil and paper work well too.
    Note: if run on a computer, the user will need to Dbl-click the Button, as Auto-Activate only works seamlessly from a DVD set-top player.
    There are several other posts on this forum (a few very recent), where I go into much more detail. Also, Jeff Bellune's excellent book, The Focal Easy Guide to Adobe EncoreDVD 2.0, by Focal Press, has excellent, easy to follow steps for doing this. Though written for EncoreDVD 2.0, 100% of the book will apply to CS3 & CS4.
    Good luck,
    Hunt

  • Displaying dynamically changing image: a problem with JLabel.

    Hello! I use NetBeans 5.5 and I develop my GUI with Matisse. I'm rather a beginner in developing GUIs with this editor...
    I'd like to display a dynamically changing image. The idea is: GUI shows the image, that is modified as some computations run in a different thread. App will be run on a single machine.
    I'm trying to display the image as a label's icon. The problem is that my app's frame can be resized - and when it is, the label also resizes. When the label is resized, the image should also be resized - the image should always be of the same size as the label. The problem? I noticed, that it works only when I make my app's bigger. When I try to lower its dimensions, the label's dimensions remain the same. Why the label don't make its size smaller?
    My code works as follows: when app's main frame is resize, the panel (the one, that the label is placed in) is also resized. And, since the label is in the panel, it (should) also be resized. So I wrote all the resize-events handlers (therefore I know that the resize event is sent when my app's frame is resized, and when the panel is resized - but the label is resized only when it grows bigger). In this methods I modify the image displayed in the label (I resize the image).
    Or, perhaps, there is some other way to show a (dynamically changing) image with Swing... I chose JLabel, because I didn't want to write my own JComponent. JLabel can display image and that is all I need. The problem is: when the label grows bigger, I create a new, bigger image (icon). Why my label don't get smaller (the resize event isn't even sent)?

    There is no component that dynamically resizes an image. You need to create your own. Something like this:
    JComponent component = new JComponent()
         protected void paintComponent(Graphics g)
              //  Scale image to size of component
              g.drawImage(yourImage, 0, 0, getWidth(), getHeight(), null);
    };

  • Changing images on jsp

    I created a jsp page with a button and a image (ImageComponent). When the button is pressed a picture is retrieved from a database and saved on the CLIENTs harddrive (ex: "C:\\img.jpg"). After this the image should be changed to the picture just downloaded from the database.
    The tried to call the methode:
    image.setUrl("C:\\img.jpg");
    then the current image dissapears, but the new image isn't displayed.
    Did I used the right methode, or should I just call some kind of refresh methode? Can you please help.
    THANX

    Google "banner rotation".
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "informatic-tec" <[email protected]> wrote in
    message
    news:efj729$mpa$[email protected]..
    > Hellow to everybody, i would like to know witch is the
    html code or script
    > that let me change images on and web page any time i
    refres it.
    >
    > I would like to make a page with 4 images at the top,
    that change
    > any time that one user refresh it.
    >
    > Thanks to anyone who can help me.
    >
    > David
    >
    >
    >

  • Changing images on html

    Hellow to everybody, i would like to know witch is the html
    code or script
    that let me change images on and web page any time i refres
    it.
    I would like to make a page with 4 images at the top, that
    change
    any time that one user refresh it.
    Thanks to anyone who can help me.
    David

    Google "banner rotation".
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "informatic-tec" <[email protected]> wrote in
    message
    news:efj729$mpa$[email protected]..
    > Hellow to everybody, i would like to know witch is the
    html code or script
    > that let me change images on and web page any time i
    refres it.
    >
    > I would like to make a page with 4 images at the top,
    that change
    > any time that one user refresh it.
    >
    > Thanks to anyone who can help me.
    >
    > David
    >
    >
    >

  • How to change image in jsp in a web application

    I had created a web application in which I have given the option to change the image in a jsp, and I am saving that image in a folder.
    The image is saved during the run time.But I am not getting that changed image.
    If I restart my server the image is retrieved . What is the solution for getting the changed image during the runtime itself?

    use javascript
    example:
    <img id='img' src="Img1.gif" border=0
         onMouseover="document.getElementById('img').src='Img2.gif'"
         onMouseout="document.getElementById('img').src='Img1.gif'">

Maybe you are looking for

  • Error publishing reports from BW

    Hi, I am facing some issues while publishing reports from BW system. I have taken care of all the settings mentioned in Integration Kit guide. We are using BOXI 3.1 SP3  OS:windows 2008 (64-bit) The error that we are getting is: "0000000001 An error

  • Reg : Master Data Mapping ( 0GL Account and CS Item)

    HI Sivakumar and Gurus, Thanks for your information. we have created all Group GL masters and assinged with Oper.GL Masters in R/3. 1.Now please guide me how to map 1 to1 of Group GL and CS_Item.I am using 0BCS_C10 cube for my consolidation. 2. We ha

  • Weird - can connect to both instances - but not to main SID

    As a newbie to RAC I got stuck... after installation of grid, db SW and a sample DB "QRC" with dbca I can connect to both instances QRC1 and QRC2, but not to QRC - here sqlplus tells me "connected to an idle instance" What did I mix up?? rac11a ~ RDB

  • Error in AJAB

    Hi, Guru When I am closing the asset F.Y 2008 in AJAB, i ts saying there is 2 asset account whose depreciation posting is pending, now as books of 2008 is closed. As I have to close 2008 posting year to open 2010 asset posting year. Please give me su

  • J2SE/JRE Version(s) on Clients

    Hi All! Can someone offer some guidance on what version(s) of J2SE/JRE we should have installed on our clients (PCs)?  We have standardized on 1.4.2_13 and are moving to 1.4.2_15 for Vista support, but we've run into several situations where SAP is a