Question about Spring Loaded links icon

Was wondering how I am able to change the icon for the spring loaded links on the dock, I know there is a method. How would I go about doing that?
Intel based iMac; 13" MacBook   Mac OS X (10.4.9)  

MrToberlone, all the icons in the Dock are aliases.
You can drag any URL from the top address window of your browser by grabbing it on its icon and dragging it to the Dock (to the right of the hairline on the side with Trash.) It will turn into a "spring". You can delete any spring icon by dragging it off the Dock and "poofing" it. Have fun
-mj
[email protected]

Similar Messages

  • Question about Finder-Load-Beans flag

    Hi all,
    I've read that the Finder-Load-Beans flag could yield some valuable gains in performance
    but:
    1) why is it suggested to do individual gets of methods within the same Transaction
    ? (tx-Required).
    2) this strategy is useful only for small sets of data, isn't it? I imagine I
    would choose Finder-Load-Beans to false (or JDBC) for larger sets of data.
    3) A last question: its default value is true or false ?
    Thanks
    Francesco

    Because if there are different transactions where the get method is called
    then the state/data of the bean would most be reloaded from the database. A
    new transactions causes the ejbLoad method to be invoked in the beginning
    and the ejbStore at the end. That is the usual case but there are other ways
    to modify this behavior.
    Thanks
    Gaurav
    "Francesco" <[email protected]> wrote in message
    news:[email protected]...
    >
    Hi thorick,
    I have found this in the newsgroup. It's from R.Woolen answering
    a question about Finder-Load-Beans flag.
    "Consider this case:
    tx.begin();
    Collection c = findAllEmployeesNamed("Rob");
    Iterator it = c.iterator();
    while (it.hasNext()) {
    Employee e = (Employee) it.next(); System.out.println("Favorite color is:"+ e.getFavColor());
    tx.commit();
    With CMP (and finders-load-beans set to its default true value), thefindAllEmployeesNamed
    finder will load all the employees with the name of rob. The getFavColormethods
    do not hit the db because they are in the same tx, and the beans arealready loaded
    in the cache.
    It's the big CMP performance advantage."
    So I wonder why this performance gain can be achieved when the iterationis inside
    a transaction.
    Thanks
    regards
    Francesco
    thorick <[email protected]> wrote:
    1) why is it suggested to do individual gets of methods within thesame Transaction
    ? (tx-Required).I'm not sure about the context of this question (in what document,
    paragraph
    is this
    mentioned).
    2) this strategy is useful only for small sets of data, isn't it? Iimagine I
    would choose Finder-Load-Beans to false (or JDBC) for larger sets ofdata.
    >
    If you know that you will be accessing the fields of all the Beans that
    you get back from a
    finder,
    then you will realize a significant performance gain. If one selects
    100s or more beans
    using
    a finder, but only accesses the fields for a few, then there may be some
    performance cost.
    It could
    depend on how large some of the fields are. I'd guess that the cost
    of 1 hit to the DB per
    bean vs.
    the cost of 1 + maybe 1 more hit to the DB per bean, would usually be
    less. A performance
    test using
    your actual apps beans would be the only way to know for sure.
    3) A last question: its default value is true or false ?The default is 'True'
    -thorick

  • Techie Question about iWeb, outbound links, and Google Analytics

    Hi,
    I have a kind of pretty technical question about using Google Analytics (GA) with iWeb sites to measure clicks on outbound links. Here's the setup:
    1) My website's online, and GA is working properly.
    2) I don't sell stuff directly, but I do have a "Purchase" page which contains a link to a specific Amazon page.
    3) I'm pretty sure I can measure how many people go to the Purchase page using GA, but how do I measure whether visitors click on the Amazon link? It would be interesting to me to be able to gauge what the conversion rate is; that is, how many people actually proceed to purchase the product at Amazon.
    I've checked the GA instructions and there's a page about manually tracking clicks on outbound links but it requires some code inputting. I know zero about coding, but I'm pretty sure that in iWeb you can't get access to the source code to input the required code.
    Am I wrong about this? And if I am, then does anyone here know how to measure the clickthrough rate?
    Anyway, hope you can help. Thanks in advance.

    I don't know about the link tracking but you could have the link take you to a redirect page which automatically sends them to Amazon.com after a preset time, 0 seconds to whatever you'd like. You can put a counter on that redirect page, like StatCounter. StatCounter can tell you how many, from where they came, i.e country and area, repeat visits, etc.
    Tutorials #12 & #13 describe how to put a visible counter on a page but with a redirect page you wouldn't have to bother since it wouldn't be seen. You can get all of your information from your account on the StatCounter site.
    The redirect page would be a simple plain text page titled redirect.html and would look like this:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="refresh"
    content="0; Destination URL">
    <title>Redirecting or whatever you'd like to appear at the top of the browser</title>
    </head>
    <body>
    </body>
    </html>
    0 Is the number of seconds to wait before redirecting the visitor. If set to zero the visitor would not know they were being redirected. Replace Destination URL with the Amazon URL you want them to go to.
    OT

  • Questions about the load processing of OpenSparc T1 Dcache

    Hi,
    I have some questions about OpenSparc T1 Dcache load processing.
    During load processing, subsequent loads to the same address need to search the store buffer for a valid store to that address. If there is a CAM hit, data is sourced from the store buffer, not from the D-cache, and no load request will be sent to the L2.
    What if there is no CAM hit. Would the load request be sent to L2? Or would Dcache be checked for the requested data?
    If the load request would be sent to L2, what next? Would the Dcache be updated?
    Thanks

    Store buffer is checked for Read after Write (RAW) condition on loads. If there is full RAW - i.e. full data exists in the store buffer - then the data is bypassed and no D cache access happens.
    If RAW is partial (e.g. word store followed by a double word load) then load is treated as a miss. Store is allowed to complete in L2 cache and then load instruction is completed.
    For the miss in STB, D cache is accessed. If hit, data is fetched from D$. If miss, data is fetched from L2$ and allocated in D$.

  • Flash newbie questions about slow loading site

    Hi all. I am new to Flash and web-site building in general and I have been learning while doing. Its fun, but frustrating. I really need some help, hope someone out there with Flash experience can give me some advice.
    My problem is this: I built a Flash website, but it is painfully slow to load up (3-5 minutes via cable modem) when I visit the site (via Firefox, etc). Once it does load up, everything is fine with navigation. I'm having a hard time figuring out why its taking so long to load up on the web because, basically, I don't know how to trouble shoot. Hope you guys can help!
    Details: the site is just a portfolio site with pictures and a few motion-things, no complicated animations. The swf file is about 9MB. I do have a flash preloader, but it doesn't show up until after the 3-5 minute "load-up" time. When I do the testing via Flash, its Ok and doesn't show the lag. But once I upload the website files and try to visit my website, the load time problem occurs.
    My thoughts:
    - do I have to purge my Flash file/library of unused images before creating my swf file?
    - Is there a problem with my html code in my index file?
    - because it is a portfolio site, I've got about 90 images on it, each image about 300-400K.  Is this too big, or about right?
    Please help! Sorry for the long email, just desperate for help. Thanks in advance for any advise!!!! Just in case, here is the html code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Acme Company</title>
    <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
    <style type="text/css">
    <!--
    body {
    background-color: #000000;
    -->
    </style>
    <link href="favicon.ico" rel="icon" />
    </head>
    <center>
    <body>
    <script type="text/javascript">
    AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','wid th','800','heigh t','600','title','Acme Company','vspace','100','src','development files/company site_AS2_2008 OCT_final','loop','false','quality','high','plugin spage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','bgco lor','#000000','scale','exactfit','movie','develop ment files/company site_AS2_2008 OCT_final' ); //end AC code
    </script><noscript><object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="800" height="600" vspace="100" title="Acme Company">
    <param name="movie" value="development files/comapny site_AS2_2008 OCT_final.swf" />
    <param name="quality" value="high" /><param name="BGCOLOR" value="#000000" /><param name="LOOP" value="false" /><param name="SCALE" value="exactfit" />
    <embed src="development files/company site_AS2_2008 OCT_final.swf" width="800" height="600" vspace="100" loop="false" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" bgcolor="#000000" scale="exactfit"></embed>
    </object></noscript>

    Yeah I'm with Ned on this one. Dynamically loading your images is the way to go. The fact that you are new to Flash, try this tutorial (http://www.entheosweb.com/Flash/loading_external_images.asp). As you move along in learning Flash, look for tutorials on actionscript arrays and loading images dynamically. Arrays allow you to call each images from a folder outside your fla. That way your site moves right along without much loading time.
    Hope I was of help,
    -Sly

  • Recent iMac Convert - Questions about Trash and Applications Icon on Dock

    Any advice would be appreciated. 2 issues:
    1. I transfered my windows files to my iMac today and having been cleaning up the various folders. I have deleted quite a few files and have opened and emptied the trash icon many times. From about 1 hour ago, the trash icon will no longer open when I single left click it, double left click it or right click it and select "Open". I can right click and select "Empty", but now I can not review what I am about to delete just in case I have accidently moved a file to the trash that I should not have.
    2. On the right side of my dock I only have icons for Documents and the Trash. I thought I was supposed to also have an icon for Applications. How can I put Applications in its proper spot on the dock. I tried dragging the applications icon from Finder to the space on the dock between the documents icon and the trash icon, but it will not allow me to do so.
    Any ideas?
    Thanks for the help.

    Same way. Navigate to /Home/ folder then drag the Documents folder to the right side of the Dock.
    Visit the site reference I gave you. You may find a solution in the FAQ I mentioned.
    You may also try the following:
    Repairing the Hard Drive and Permissions
    Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Installer menu (Utilities menu for Tiger and Leopard.) After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list. In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive. If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer. Now shutdown the computer for a couple of minutes and then restart normally.
    If DU reports errors it cannot fix, then you will need Disk Warrior (4.0 for Tiger, and 4.1 for Leopard) and/or TechTool Pro (4.6.1 for Leopard) to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.

  • Question about using database links in Forms 10g

    I have a form that uses a database link for the "Query Data Source Name," i.e. it is set to some_view@some_db_link
    For some reason when I run a query using the DB link the query takes approximately 30 seconds. When I remove the link and go local the query takes about one second. Has anybody observed and addressed this issue before (without going local of course)?
    Thanks,
    Thomas

    Let me first say that it is never a good idea to use a db link in the data source. It is better to create a synonym in the database and use this as the data source. If the db link changes, you only have to do this in the database, without recompiling forms.
    create synonym some_view for some_view@some_db_link
    This may already solve your problem. If not, than see if the query is also slow in sqlplus. You may have a problem in your connection between the two databases.

  • Question about how put a icon custom in toolbar.

    I have developed a accion in acrobat X but i need put  a icon in toolbar for execute this accion, i have put an icon but this icon only shows the window modify an accion, somebody know how custom a icon for execute my accion?

    It's not possible to place an Action onto the toolbar, nor can you give them custom icons. Are you actually talking about a JavaScript function which creates a button? If you are, you can't put those on the toolbar either. The USER can drag them there, but the script cannot.

  • Question about Access database linking in SharePoint

    I have a database table I created in Access 2010, I can get it into SharePoint as a list and then create a calendar view.  I used the SharePoint icon under Database Tools in Access.  My problem is that when I enter new information in the Access
    Database I am not able to get SharePoint to reflect this update.
    I should state that I am extremely rusty with Access and SharePoint.
    I appreciate any help that can be offered and I thank you in advance.

    Check out few synchronization options from the following link, hope it helps
    https://support.office.com/en-us/article/Synchronize-a-SharePoint-2010-list-with-Access-2010-975bfb97-c799-4fce-b7cc-3db3b397f116
    Cheers,

  • One question about lcds2.5 link with java

    when i am creating a custom Message Service adapter,found a
    question with rewriting invoke() method.
    java class :
    package test;
    import flex.messaging.services.ServiceAdapter;
    import flex.messaging.services.MessageService;
    import flex.messaging.messages.Message;
    public class TestAdapter extends ServiceAdapter {
    public Object invoke(Message message) {
    MessageService msgService = (MessageService)service;
    msgService.pushMessageToClients(message, true);
    msgService.sendPushMessageFromPeer(message, true);
    return null;
    error:
    service can not resolved about MessageService msgService =
    (MessageService)service;
    please tell me a method :how to write this TestAdapter class.

    ths, i can success.
    but one error occur when i send message from java class to
    lcds2.5 service.
    i tranfer this IMessageUtil interface's setMessage method,set
    param as "test",but no value in mxml file's mx:Consumer .
    my message-config.xml is correct.
    message-config.xml:
    <adapter-definition id="fdschathandler" class="test"/>
    <destination id="fdschat">
    <properties>
    <network>
    <session-timeout>0</session-timeout>
    </network>
    <server>
    <max-cache-size>1000</max-cache-size>
    <message-time-to-live>0</message-time-to-live>
    <durable>false</durable>
    </server>
    </properties>
    <channels>
    <channel ref="my-rtmp"/>
    </channels>
    <adapter ref="fdschathandler"/>
    </destination>
    java class:
    package test;
    import flex.messaging.MessageBroker;
    import flex.messaging.MessageException;
    import flex.messaging.messages.AsyncMessage;
    import flex.messaging.messages.Message;
    import flex.messaging.services.MessageService;
    import flex.messaging.services.ServiceAdapter;
    public class MessageUtil extends ServiceAdapter implements
    IMessageUtil {
    public Object invoke(Message message) {
    try{
    MessageBroker broker = MessageBroker.getMessageBroker(null);
    MessageService msgService = (MessageService)
    broker.getService("message-service");
    msgService.pushMessageToClients(message, true);
    msgService.sendPushMessageFromPeer(message, true);
    return null;
    }catch(MessageException ff){
    System.out.println("fff:="+ff.getErrorMessage());
    catch(Exception e){
    e.printStackTrace();
    return message;
    public void setMessage(String mess) {
    try{
    AsyncMessage message=new AsyncMessage();
    message.setDestination("fdschat");
    message.setBody(mess);
    this.invoke(message);
    }catch(Exception e){
    e.printStackTrace();
    mxml:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="consumer.subscribe()">
    <mx:Script>
    <![CDATA[
    import mx.messaging.events.MessageEvent;
    import mx.messaging.messages.AsyncMessage;
    import mx.messaging.messages.IMessage;
    private function send():void
    var message:AsyncMessage = new AsyncMessage();
    message.body = msg.text;
    producer.send(message);
    msg.text = "";
    private function messageHandler(message:MessageEvent):void
    var msg:AsyncMessage = AsyncMessage( message.message );
    log.text += msg.body + "\n";
    ]]>
    </mx:Script>
    <mx:Producer id="producer" destination="fdschat"/>
    <mx:Consumer id="consumer" destination="fdschat"
    message="messageHandler(event)"/>
    <mx:Panel title="Chat" width="100%" height="100%">
    <mx:TextArea id="log" width="100%" height="100%"/>
    <mx:ControlBar>
    <mx:TextInput id="msg" width="100%" enter="send()"/>
    <mx:Button label="Send" click="send()"/>
    </mx:ControlBar>
    </mx:Panel>
    </mx:Application>

  • Question about creating a link in a photoshop cs4 banner

    Does anyone know the answer to this question??:
    Does anyone know how to make a link clickable in photoshop cs4, say in a banner created in photoshop cs4, like a link to a website or an E-mail, without doing image map, but directly inside of photoshop cs4?? I need to know this ASAP!
    Thank you,
    Jon

    HI Trevor.Dennis:
    Question 1. Do you mean opening an image that I saved in Adobe Photoshop
    CS4 to a folder on my computer?? Because I tried that and it wouldn't let
    me do that.
    Question 2. OR, since I cannot do that, how do I move an image from a
    folder on my computer to InDesign??
    Question 3. And then once in InDesign, how do I make links clickable??
    Question 4. I'm enclosing a banner I made in Photoshop CS4 this afternoon,
    and want to know how I can make
    the Website: http://promoterpower.com and Email:
    [email protected] in InDesign??
    Let me know ASAP!!!

  • Question about google search and icons on iphone interface icons.

    Hey everyone. I noticed that I can look up images on google but nothing comes up when I do a web search on anything I got what I needed from yahoo but the page just stays blank on Google. I restarted my iphone with no luck. Has anybody else noticed this issue or is it a preferences setting? My second question is, can I get rid of things I don't want on my iphone interface like the weather or stocks programs (icons). Thanks for the help.
    -Mike

    Thanks for getting back to me. What I meant by my first question is, when I go into Safari and then select google in the bookmarks I can't get a result when I enter a key word in the search field on the Google page. I touch the search window and the keyboard pops up. I put in something I want to search for and nothing happens. Any ideas would be great.
    Thanks.
    -Mike

  • Muse/Acrobat question about interactive PDFs linked to in Muse...

    So I made a link to email, gave it a blue rollover state, exported this in an interactive PDF which I then have a link to in Muse. When you click on it, it opens in a new window/tab, w/ this weird gray color behind it. Any ideas how I can remove this? See link below for a visual:
    http://imgur.com/fAAKFLS
    Thanks!

    When a PDF is opened in a browser, it can either use Acrobat/Reader, or something else such as the default PDF viewers in Chrome and Firefox. If it is being opened in one of these non-Adobe PDF viewers, be prepared for behavior that's different than it is in Acrobat/Reader, especially with interactive elements. The one in Chrome is better than the one in Firefox.

  • Question about the db-link SCN flaw

    I understand why the SCN is synced between two databases when a DML transaction is made via db-link, but can someone explain to me why a simple SELECT statement via db-link causes the SCN to sync? Will this behaviour still be true after implementing the new patch?

    902074 wrote:
    I understand why the SCN is synced between two databases when a DML transaction is made via db-link, but can someone explain to me why a simple SELECT statement via db-link causes the SCN to sync? Will this behaviour still be true after implementing the new patch?It's possible that it's a strategy aimed at keeping the code simple.
    Remember that the default behaviour of a query is to be read-consistent with the starting SCN for the query, and then consider distirbuted nested loop join where the second (inner) table is at the remote database. For each row in the first row source the local database will execute a query against the remote database - but for distributed read-consistency every execution of that query on the remote database ought to be read-consistent with the start SCN of the first execution. This means that, in general, a distributed query (which could access an arbtrary number of remote databases, and have ann arbitrary number of parts at each remote database) will have to remember the SCN of the first time that it touched every remote datbase in the query. It's far easier, therefore, to bump the SCN at the remote database at the first touch of the query and then go read-consistent to that point.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    Author: <b><em>Oracle Core</em></b>

  • Question about image loading problem

    Dear Java Gurus,
    I am writing a simple Java Applet application. Basically what it does is every 3 seconds, it tries to get an image from a server and display it (also based on the browser�s client size to do some resize of the image to fit the width of the browser�s client area). But frequently I got this kind of exceptions:
    ----------------------------- Exception 1 --------------------------------------
    Uncaught error fetching image:
    java.lang.ArrayIndexOutOfBoundsException
    at java.lang.System.arraycopy(Native Method)
    at sun.awt.image.PNGFilterInputStream.read(Unknown Source)
    at java.util.zip.InflaterInputStream.fill(Unknown Source)
    at java.util.zip.InflaterInputStream.read(Unknown Source)
    at java.io.BufferedInputStream.fill(Unknown Source)
    at java.io.BufferedInputStream.read1(Unknown Source)
    at java.io.BufferedInputStream.read(Unknown Source)
    at sun.awt.image.PNGImageDecoder.produceImage(Unknown Source)
    at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source)
    at sun.awt.image.ImageFetcher.fetchloop(Unknown Source)
    at sun.awt.image.ImageFetcher.run(Unknown Source)
    ----------------------------- Exception 2 ------------------------------------------
    sun.awt.image.PNGImageDecoder$PNGException: crc corruption
    at sun.awt.image.PNGImageDecoder.getChunk(Unknown Source)
    at sun.awt.image.PNGImageDecoder.getData(Unknown Source)
    at sun.awt.image.PNGFilterInputStream.read(Unknown Source)
    at java.util.zip.InflaterInputStream.fill(Unknown Source)
    at java.util.zip.InflaterInputStream.read(Unknown Source)
    at java.io.BufferedInputStream.fill(Unknown Source)
    at java.io.BufferedInputStream.read1(Unknown Source)
    at java.io.BufferedInputStream.read(Unknown Source)
    at sun.awt.image.PNGImageDecoder.produceImage(Unknown Source)
    at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source)
    at sun.awt.image.ImageFetcher.fetchloop(Unknown Source)
    at sun.awt.image.ImageFetcher.run(Unknown Source)
    Which will cause the image goes to blank in the browser and also degreed down the performance, and I do not know where they are coming from. I tried to put try-catch blocks at possible method calls, but still it does not catch these kind exceptions.
    ---------------------------- My Source Code ----------------------------
    import java.io.*;
    import java.awt.*;
    import java.net.*;
    import java.util.*;
    import java.applet.*;
    import javax.swing.*;
    import java.awt.event.*;
    // This is for Popup Menu
    class PopupListener extends MouseAdapter
    JPopupMenu popup;
    PopupListener(JPopupMenu popupMenu)
    popup = popupMenu;
    public void mousePressed(MouseEvent e)
    maybeShowPopup(e);
    public void mouseClicked(MouseEvent e)
    maybeShowPopup(e);
    public void mouseReleased(MouseEvent e)
    maybeShowPopup(e);
    private void maybeShowPopup(MouseEvent e)
    if (e.isPopupTrigger())
    popup.show(e.getComponent(), e.getX(), e.getY());
    // Image Component who contains the image and will be hosted in the ScrollPane
    class ImageComponent extends JComponent
    Image onscrImage;
    Dimension comSize;
    ImageComponent(Image image)
    onscrImage = image;
    setDoubleBuffered(true);
    comSize = new Dimension(onscrImage.getWidth(null), onscrImage.getHeight(null));
    setSize(comSize);
    public synchronized void paint(Graphics g)
    super.paint(g);
    g.drawImage(onscrImage, 0, 0, this);
    public Dimension getPreferredSize()
    return comSize;
    // Update the image with new image
    public void setImage(Image img)
    onscrImage = img;
    comSize = new Dimension(onscrImage.getWidth(null), onscrImage.getHeight(null));
    setSize(comSize);
    // The main Applet hosted in the browser
    public class MWRemotingApplet extends JApplet
    //Media Tracker to manage the Image loading
    MediaTracker medTracker;
    Image my_Image;
    // ScollPane who contains the image component
    JScrollPane scrollPane;
    ImageComponent imgComp;
    // The applet base URL and image filename passed from htm who hosted the Applet
    URL base;
    String filename;
    // Schedules getting the image
    private java.util.Timer timer;
    private int delay = 3000;
    private boolean bFitToBrowser = false;
    private int iVScrollbarWidth = 20;
    // Popup Menu
    JPopupMenu jPopupMenu;
    JMenuItem popupMenuItem;
    public void init()
    // Set the layout to GridLayout then the it can fill in the Applet
    setLayout(new GridLayout());
    try
    // getDocumentbase gets the applet path.
    base = getCodeBase();
    // Get the image file name from the parameter
    filename = getParameter("filename");
    catch (Exception e)
    JOptionPane.showMessageDialog(null, "Failed to get the path and filename of the image!", "Message", 0);
    return;
    // Create the Media Tracker
    medTracker = new MediaTracker(this);
    // Download the image from the remote server
    // If the image width is greater than the width of the current browser client area
    // Resize the image to fit the width
    // This is because for some reason, this will lead to image not refreshing
    DownloadImage();
    //Add the popup menu
    jPopupMenu = new JPopupMenu();
    popupMenuItem = new JMenuItem("Fit to Browser");
    popupMenuItem.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent event) {
    bFitToBrowser = !bFitToBrowser;
    if(bFitToBrowser)
    popupMenuItem.setText("Original Size");
    FitToBrowser();
    else
    popupMenuItem.setText("Fit to Browser");
    DownloadImage();
    if(my_Image != null)
    imgComp.setImage(my_Image);
    jPopupMenu.add(popupMenuItem);
    // Create the image component
    imgComp = new ImageComponent(my_Image);
    //Add listener to the image component so the popup menu can come up.
    MouseListener popupListener = new PopupListener(jPopupMenu);
    imgComp.addMouseListener(popupListener);
    // Create the scroll pane
    scrollPane = new JScrollPane(imgComp);
    scrollPane.setDoubleBuffered(true);
    // Catch the resize event of the Applet
    addComponentListener(new ComponentAdapter()
    public void componentResized(ComponentEvent e)
    super.componentResized(e);
    if(bFitToBrowser)
    FitToBrowser();
    else
    DownloadImage();
    if(my_Image != null)
    imgComp.setImage(my_Image);
    //Add Components to the Applet.
    add("Center", scrollPane);
    validate();
    // Start the timer to periodically download image
    // from remote server
    public void start()
    timer = new java.util.Timer();
    timer.schedule(new TimerTask()
    //creates a timertask to schedule
    // overrides the run method to provide functionality
    public void run()
    DownloadImage();
    if(my_Image != null)
    imgComp.setImage(my_Image);
    , 0, delay);
    public void stop()
    timer.cancel(); //stops the timer
    public synchronized void DownloadImage()
    if(my_Image != null)
    my_Image.flush();
    my_Image = null;
    try
    my_Image = getImage(base, filename);
    catch (Exception e)
    my_Image = null;
    return;
    medTracker.addImage( my_Image, 0 );
    try
    medTracker.waitForAll();
    if ( my_Image != null )
    medTracker.removeImage(my_Image);
    catch (InterruptedException e)
    JOptionPane.showMessageDialog(null, "waitForAll failed while downloading the image!", "Message", 0);
    catch(Exception e1)
    System.out.println("Get Exception = " + e1.getMessage());
    e1.printStackTrace();
    if(bFitToBrowser)
    FitToBrowser();
    else if(my_Image.getWidth(null) > this.getSize().width)
    FitToWidth();
    // Resize the image to fit the browser width and height
    public synchronized void FitToBrowser()
    if(my_Image != null)
    my_Image = my_Image.getScaledInstance(this.getSize().width - 5, this.getSize().height - 5, java.awt.Image.SCALE_SMOOTH);//java.awt.Image.SCALE_AREA_AVERAGING);//java.awt.Image.SCALE_SMOOTH);
    medTracker.addImage( my_Image, 0 );
    try
    medTracker.waitForAll();
    medTracker.removeImage(my_Image);
    catch (InterruptedException e)
    JOptionPane.showMessageDialog(null, "waitForAll failed!", "Message", 0);
    catch (Exception e1)
    System.out.println("Get Exception = " + e1.getMessage());
    e1.printStackTrace();
    // Resize the image to fit the browser width only
    public synchronized void FitToWidth()
    if(my_Image != null)
    int fitHeight = (int)((this.getSize().width - iVScrollbarWidth)*(my_Image.getHeight(null)+0.0)/my_Image.getWidth(null));
    my_Image = my_Image.getScaledInstance(this.getSize().width - iVScrollbarWidth, fitHeight, java.awt.Image.SCALE_SMOOTH);
    medTracker.addImage( my_Image, 0 );
    try
    medTracker.waitForAll();
    medTracker.removeImage(my_Image);
    catch (InterruptedException e)
    JOptionPane.showMessageDialog(null, "waitForAll failed!", "Message", 0);
    catch (Exception e1)
    System.out.println("Get Exception = " + e1.getMessage());
    e1.printStackTrace();
    }

    [url http://forum.java.sun.com/thread.jsp?thread=518979&forum=14]Please[url http://forum.java.sun.com/thread.jsp?thread=518977&forum=32] do[url http://forum.java.sun.com/thread.jsp?thread=518973&forum=37] not[url http://forum.java.sun.com/thread.jsp?thread=518978&forum=42] crosspost. Or [url http://forum.java.sun.com/thread.jsp?forum=7&thread=518976]double-post. Or post to the wrong forum. Or use non-sense subject.

Maybe you are looking for