Zoom in and zoom out a image in a java applet

hello, i don't find any example of code of a java applet that zoom in and zoom out an image in jpeg format...
can you help me?
thanks

Crosspost (and other thread has started some answers):
http://forum.java.sun.com/thread.jspa?threadID=624295

Similar Messages

  • How to open,view pdf document in a form with zoom in and zoom out functionality Please urgent

    Hi
    Anybody can help me with a sample code in c# to open a pdf document using forms and to give the functionality   zoom in and zoom out   with verticall and horizontal scroll bar. Please help
    Regards
    Pol
    polachan

    Hello polachan,
    you can find two sample projects with code at
    [1] and
    [2].
    [1]
    http://www.codeproject.com/Articles/579878/MoonPdfPanel-A-WPF-based-PDF-viewer-control
    [2]
    http://www.gnostice.com/nl_article.asp?id=159&t=How_To_Create_A_PDF_Viewer_in_PDFOne_NET_v2_x
    Regards,
    Bo Liu
    Developer-Hotline for MSDN Online Germany
    Disclaimer:
    Please take into consideration, that further inquiries cannot or will be answered with delay.
    For further information please contact us per telephone through the MSDN-Entwickler-Hotline:
    http://www.msdn-online.de/Hotline
    For this post by the MSDN-Entwickler-Hotline the following terms and conditions
    apply: Trademarks,
    Privacy
    as well as the separate
    terms of use for the MSDN-Entwickler-Hotline .

  • Panel content zoom in and zoom out

    I have created a panel  by using flex 4.5.1.But while increasing and decreasing  panel size content of panel also zoom in and zoom out respectively.But i dont want this functionality.Is there any way to overcome these problem?

    thnx..
    I have included above mentioned compiler argument but it works as before it work.There is no change in zoom_in, zoom_out functionality.

  • Stopping Zoom in and Zoom out of pictures

    I can't seem to find where I turn off the Zoom in and Zoom out features in iMovie related to pictures.
    Where or what I have to do to turn this feature off..
    Thanks

    Hi Douglas,
    Thanks for visiting Apple Support Communities.
    It does look like this is the default behavior for imported pictures in iMovie 10, and can't be disabled from the iMovie preferences. The best workaround is to select all of the pictures in your timeline and turn off the Ken Burns effect using the Adjust menu.
    iMovie Help
    http://help.apple.com/imovie/mac/10.0/#mov26d3f6a6c
    Modify a crop, rotation, or Ken Burns effect
    In the timeline, select the photos you want to modify or restore to their original state.
    Click the Adjust button in the toolbar.
    The adjustments bar appears above the clip in the viewer.
    To show the cropping controls, click the Cropping button.
    In the cropping controls, change Style from Ken Burns to Fit to display the pictures in their original size. From there, you can crop them individually as needed.
    Best,
    Jeremy

  • TileLayout spark Item Renderer and Zoom in and zoom out

    I implemented a spark ItemRenderer, which serves a DataGroup with TileLayout:
        <s:Border id="scrollView"
                  styleName="scrollView"
                  width="100%"
                  height="100%">
            <s:filters>
                <s:DropShadowFilter inner="true"
                                    alpha=".35"/>
            </s:filters>
            <s:Scroller id="continuousViewScroller"
                        height="100%"
                        width="100%">
                <s:DataGroup id="continuousView"
                             height="100%"
                             width="100%"
                             itemRenderer="PageRenderer"
                             dataProvider="{pages}">
                    <s:layout>
                             <s:TileLayout columnAlign.OneUpView="justifyUsingWidth"
                             columnAlign.TwoUpView="left"
                             verticalGap="10"
                             horizontalGap.TwoUpView="10"
                             horizontalAlign="center"
                             verticalAlign="top"
                             useVirtualLayout="true"
                             clipAndEnableScrolling="false"
                             requestedColumnCount.OneUpView="1"
                             requestedColumnCount.TwoUpView="2"/>
                        <!--
                        <s:VerticalLayout horizontalAlign="center"
                                          useVirtualLayout="true"
                                          clipAndEnableScrolling="false"
                                          variableRowHeight="true"
                                          paddingTop="5"
                                          paddingBottom="5"
                                          requestedRowCount="2"/>
                        -->
                    </s:layout>
                </s:DataGroup>
            </s:Scroller>
        </s:Border>
    I execute a zoom effect everytime some one pushes zoom in or zoom out buttons. The trouble is that zoom in and zoom out works fine. However, the gap between two item renderers increase, when I zoom out.
    Is there a way that the gap remains fixed?

    Zoom in means, within the PageRenderer, I use a Scale effect, which zooms in and out based on an event. The following code is for doing zoom in and zoom out for the PageRenderer. It works fine. However, the vertical/horizontal gaps increases once have a zoomed in and then try to zoom out incrementally. I want to keep the gap between elements same all the time.
    If I run this same code, with VerticalLayout, It works great. However, this does not work with TileLayout.
    The following link:
    http://opensource.adobe.com/wiki/display/flexsdk/Spark+TileLayout
    says:
    "Note that justify only grows the columnWidth/rowHeight, so to handle cases where the size of the columns/rows has to shrink, the default column width/row height should set explicitly to zero."
    Does anyone has any idea how to implement this?
    Source Code for zoom in and zoom out:
    <s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:s="library://ns.adobe.com/flex/spark"
                    xmlns:mx="library://ns.adobe.com/flex/halo"
                    creationComplete="init()">
        <fx:Declarations>
            <s:Scale target="{this}" id="zoomPlayer"  duration="150" />
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                import mx.core.FlexGlobals;
                import mx.events.EffectEvent;
                private var _zoom:Number=1.0;
                [Bindable]
                public function set zoom(value:Number):void
                    _zoom=value;
                public function get zoom():Number
                    return _zoom;
                private function init():void
                    var proj:TestProject=FlexGlobals.topLevelApplication as   TestProject;
                    proj.systemManager.addEventListener(ZoomEvent.ZoomChange, updateZoom);
                private function updateZoom(event:ZoomEvent):void
                    if(zoom != event.zoom){   
                        if(zoomPlayer.isPlaying){
                            zoomPlayer.stop();
                        zoomPlayer.addEventListener(EffectEvent.EFFECT_END, zoomEnd);
                        zoomPlayer.scaleXFrom=zoom;
                        zoomPlayer.scaleXTo=event.zoom;
                        zoomPlayer.scaleYFrom=zoom;
                        zoomPlayer.scaleYTo=event.zoom;
                        zoomPlayer.play();
                        zoom=event.zoom;
                private function zoomEnd(event:EffectEvent):void{
                    zoomPlayer.removeEventListener(EffectEvent.EFFECT_END,zoomEnd);

  • What happened to zoom in and zoom out selection, so you could make the screen zoom in and out?

    I added zoom in and zoom out to my yahoo toolbar and from one of the sites that let you pick buttons to add to your toolbar, and now it has disappeared. And I can not find zoom anywhere. Have you heard of this happening before? If so do you have a resolution for this? Thanks in advance. Dan

    You seem to be using a Firefox 23.0a1 Nightly build.
    Please update to the current Firefox 24 release.
    *Help > About Firefox
    *https://support.mozilla.org/kb/update-firefox-latest-version.
    *https://support.mozilla.org/kb/Updating+Firefox
    The Firefox version that you currently run is no longer supported with security updates.
    *It is important to update Firefox and add-ons to the latest version to get all security fixes.
    Make sure that toolbars like the "Navigation Toolbar" and the "Bookmarks Toolbar" are visible.
    *Firefox menu button > Options
    *View > Toolbars (press F10 to display the menu bar)
    *Right-click empty toolbar area
    Use Toolbar Layout (Customize) to open the Customize window and set which toolbar items to display.
    *if missing items are in the toolbar palette then drag them back from the Customize window on the toolbar
    *if you do not see an item on a toolbar and in the toolbar palette then click the "Restore Default Set" button to restore the default toolbar setup
    *https://support.mozilla.org/kb/How+to+customize+the+toolbar
    *https://support.mozilla.org/kb/Back+and+forward+or+other+toolbar+items+are+missing

  • Zoom in and Zoom out

    How to zoom in and Zoom out the particular area in
    Graph

    hi,
    for zooming in & zooming out,you need to extend canvas class from AWT.Overide the method getPreferredSize() from component.Then attach this class to scrollpane.Add this scrollpane to container(Applet/Frame).Keep two button for zooming in & zooming out.when zooming in button is clicked increse the canvaswidth by amount you want,then say scrollpane.doLayout().This will create scrollbars to scrollpane.Try it out.If any difficulty then email me at [email protected]
    cheers
    dgk

  • Mesh line artifact movement upon zooming in and zooming out of composition

    I'm having a problem with my puppet tool in my After Effects composition–I'm getting this strange mesh line artifact.  The layers have been imported from an Illustrator file.  The boy has six puppet pin points.  Hand, wrist, elbow, shoulder, neck and head.  The actual animation of the puppet looks great, however, the problem arises with the zooming in and zooming out and panning over.  I'm zooming in and panning over to the boy with a camera layer and null object layer before the puppet animation and then zooming out and panning away from the boy when it is over, and it's as if the mesh outline is following my null object layer during the pan and zoom...  The boy is not on a pre-comp, and I tried to put in pre-comp to see if it made a difference but it does not.  I also tried expanding the mesh but it doesn't work either.  Any suggestions? 

    I'm having a similar problem. I have an illustrator file that I have a position and rotation change (to have the hand fly in), then the puppet tool mesh to have the pointer finger move to dial the numbers on the phone. I have tried non-pre-comped and pre-comped. Both produce the same results. In the first picture you can see that the mesh doesn't change position/rotation with the pre-comp. They seem to stay where I originally placed them. And where the hand flies in and moves over the mesh, that artifact is generated. I have tried expanding the mesh and making the pre-comp layer 3d.
    It's rather frustrating, and I haven't found anybody solving this problem out here on the interwebs.
    ***OK OK. The only way I figured out to fix this was to make the illustrated hand the exact size I need it in Illustrator. Then I just don't make the layer "continuously rasterized".

  • How create zoom in and zoom out buttons in a JfreeChart

    hi,
    i want implements a "zoom in" and "zoom out" functionalitys form my Jfreechart. in a popupmenu this function there is, but i want create two buttons.
    I don't know how implement this.
    Can you help me???
    Tanx
    P.S. Sorry for my english :D

    If you right click on any of the JFreeChart standard examples you will see buttons that allow you to zoom in and zoom out. Just follow the code that the examples use. This feature can be enabled/disabled using the parameters in the chart construction. Check the Javadoc.

  • How to Zoom in and zoom out

    Hi All,
    I am making a JFrame in which animation is shown. Balls are moving randomly on the canvas. I want to zoom in and zoom out the animation. How can i do that . Any source code or ant tip please.

    AffineTransformya, or Graphics2D.scale

  • TheThe "Zoom in" ( ) and "Zoom out" (-) buttons stopped working

    The  “Zoom in” and “Zoom out” buttons stopped working when I open a pdf file within Safari. I'd appreciate some direction as to what I should do.
    Thanks,
    Julio

    Carolyn,
    I downloaded and installed the Adobe plug in and it worked.
    For those who may read this. I downloaded "AdbeRdr1013_en_US.dmg" from the link below:
    http://www.adobe.com/support/downloads/detail.jsp?ftpID=5363/.
    Have a nice day.
    Julio

  • Firefox RC does not allow me to use the zoom in and zoom out function on Apple Touchpad

    A couple of weeks ago, I tried out Firefox 4 Beta version, but soon I realized that Firefox 4 Beta does not support certain functions of the multi-touch pad, of the Apple Macbook I bought in 2010. The two finger scroll works. The three finger swipe to go forward or back in the web browser also works. But what does not work, is the two finger zoom in and zoom out function.

    In the address bar type without quotation "about:config" then hit enter. Be careful about what you type. I would suggest copy/paste.
    Scroll down to
    "browser.gesture.pinch.in"
    right click and in the small window under value type without quotation "cmd_fullZoomReduce"
    Scroll down to
    browser.gesture.pinch.in.shift
    right click and in the small window under value type without quotation "cmd_fullZoomReset"
    Scroll down to
    browser.gesture.pinch.out
    right click and in the small window under value type without quotation "cmd_fullZoomEnlarge"
    Scroll down to
    browser.gesture.pinch.out.shift
    right click and in the small window under value type without quotation "cmd_fullZoomReset"

  • Zooming, scrolling and moving in large images

    I'd like to create a document viewer that works like Google Maps or Safari. Basically the "image" of the document is so big that I only want to load parts of it when the user actually goes over to that part of it.
    How can I enable zooming, scrolling and moving in "large" images like that?
    I looked for a tutorial or sample code, but I wasn't able to find anything.
    Any help would be appreciated,
    -Chris.

    I have 4 Gbyte of RAM. I tried to close every applications but the problem remains. You are right about Web Browser problems but unfortunately my problem is related with Finder windows too. I have 800 Mbyte of free RAM.
    Another fact I can say to you is that when I move Finder window (or other windows as I wrote before) the area outside the border of the window is repainted not well with puzzle effect. I think the problem is related to desktop refresh and repaint. It seems that graphic acceleration doesn't work for some window!!!!

  • Zoom in and zoom to images?

    How can i zoom in and out my images to orqcle portal?
    general for images whre can i find a additional portlet?
    thanks,

    I don't know what is the correct terminology, but none of those things does what I want.  With the Content Grabber I can move the image and see where it is going and place it where I want it, and the frame does not move and is not changed in any way. I want something that does exactly the same thing with "zooming" in and out on the image.
    Shift-drag on the corners moves the frame.  In the Transform panel, in the lower box, it makes the image AND the frame larger or smaller. Neither of these is what I want.
    If I'm not using the right terminology, let me try to explain.  If I have an image that is larger than the frame, then I can only see a small part of the image inside the frame.  If I could zoom out on the image, I would then see a larger part of the image in the frame, but the frame would be exactly the same size and in exactly the same place (just like it would be when you use the Content Grabber).  If I could zoom in on the image, then I would see less of the image but in more detail.
    If I could move (like the Content Grabber) AND zoom without doing anything with the frame, then I could get the image just the way I want it inside an already-properly-placed frame in the most straightforward and simple manner, and be able to see what I was doing in the process. Dragging on the corners is basically trial and error because you have to go through several steps before you see the final result.

  • Wrong image refresh in java applet AND Windows 7

    I'm managing since few days a java applet that takes an image from an industrial product and shows it in a browser (simple web server).
    There is following issue: the image is not correctly loaded and refreshed in its own window if just opened but only if the applet is running on Windows 7. The issue is solved as soon as I reduce the window to icon (minimize) and then resize it. I'm looking into java documentation on how to manage the image rendering, maybe I have to override some update or redraw method more, but it is taking time and I'm still learning. NOTE that the window opened does show the issue only when the windows size is not completely shown in the monitor.
    Meanwhile I'm wandering if some of you faced and solved similar problem.
    Thank you in advance,
    Elena

    Thank you Nitin for your quick reply!
    These are the calling of the functions in the code. As you can see, before to show the image, we are managing a zoom/unzoom by mouse wheel and an addition of writings data on the image itself. All is working fine except on W7:
    public void paint(Graphics g)
         //System.out.println("[ImageFrame::paint my paint!!!]");
         this.PaintImage(g);
    public void update(Graphics g)
         // System.out.println("[ImageFrame::update]");
         this.repaint();
    public void PaintImage(ImageInfo imageInfo, float fps)
         if (imageInfo != null)
              if (this.getImageInfoRef() == null){
                   this.setVisible(true);
              this.setTitle("Image Viewer (" + imageInfo.bufferedImage.getWidth() + "x" + imageInfo.bufferedImage.getHeight() + ") ");
              this.resizeImageFrame((int) (imageInfo.bufferedImage.getWidth() * zoomFactor), (int) (imageInfo.bufferedImage.getHeight() * zoomFactor));
              this.lastFps = fps;
              this.setImageInfoRef(imageInfo);
              //System.out.println("this.getWidth(): " + this.getWidth() + " this.getHeight(): " + this.getHeight() + " zoomFactor: " + zoomFactor);////
              this.PaintImage(this.getGraphics());
    public synchronized void PaintImage(Graphics g)
         ImageInfo locImageInfo = getImageInfoRef();
         if (locImageInfo != null)
              try
                   this.resizeImageFrame((int) (locImageInfo.bufferedImage.getWidth() * zoomFactor), (int) (locImageInfo.bufferedImage.getHeight() * zoomFactor));
                   BufferedImage bufferedImage = this.resizeBufferedImage(locImageInfo.bufferedImage, zoomFactor);
                   this.overlayCodeInfo(bufferedImage, locImageInfo.decInfoStruct, zoomFactor);
                   this.overlayPointerInfo(bufferedImage, locImageInfo.scaling, zoomFactor, this.crossX, this.crossY);
                   this.overlayFrameRateInfo(bufferedImage, this.lastFps);
                   Image img = Toolkit.getDefaultToolkit().createImage(bufferedImage.getSource());
                   boolean retdraw;
                   retdraw = g.drawImage(img, frameUpperBondarySizeX, frameUpperBondarySizeY, this);
              catch (Exception ex)
                   System.out.println("[ImageFrame::PaintImage] Exception: " + ex);
    Thank you again
    Elena

Maybe you are looking for

  • No sound through HDMI on GX630

    Hello! I have GX630. When I connected it with my LCD TV via HDMI, I've got video, but not sound. HDMI is checked as prefered device and Win7 shows that sound is working. Can you help me?

  • Inserting table in web form/ Inserting multiple cells in a single row

    Dear Mr Johnson, Thanks for your early reply. I am rather disappointed .....as I need to distribute my form urgently with a table insertion capability. I had purchased Adobe webform central subscription with the idea that a paid subscription will fet

  • Problem with AS3

    Hello, I'm still learning Flash and Action Script 3, however i decided to try and create a game for a class. I have run into a problem, which I'm not sure how to fix. When I navigate to the second frame of the movie and use the buttons I recieve "Typ

  • Enter Condition in SM30

    Hi All, I have a requirement wherein I am creating an custom table with table maintenance generator with 1 screen but client want that before going into the single screen view of the table maintenance generator a dialog box should come where we have

  • Login/password_expiration_time

    is there a exception table for user, who should keep the password longer ?