Results 1 to 3 of 3
  1. #1
    ps20090 is offline Member
    Join Date
    Sep 2009
    Posts
    1
    Rep Power
    0

    Default Java Zoom in and Zoom out?

    I need an java applet where i can add images and can zoom in and zoom out with help of control buttons.

    I need to show presentation on mobile , so i use slideshow generator by "Vangen Software : Slideshow Generator" for adding images as otherwise it is not secure to add images to phone like that but problem is it lacks feature of zoom in and zoom out. How can i create it? Or any other software like that builds jar with images and zoom in and zoom outs?

  2. #2
    mrmatt1111's Avatar
    mrmatt1111 is offline Senior Member
    Join Date
    Aug 2009
    Location
    San Jose, CA, USA
    Posts
    320
    Rep Power
    6

    Default

    Java Code:
    ...
    public void paintComponent(Graphics g)
    {
       Graphics2D g2d = (Graphics2D)g;
       ...
        g2d.translate( x, y ); //set your origin or leave it at 0,0
        g2d.scale( scale, scale ); //zoom in and out by changing the scale
        ...
        //draw your image
        ...
    }
    ...
    Also take a look at AffineTransform.
    My Hobby Project: LegacyClone

  3. #3
    MagicToolbox is offline Member
    Join Date
    Sep 2009
    Posts
    1
    Rep Power
    0

    Default How about JavaScript and Flash?

    Do you have to use a Java applet? If your content is served in a browser, you can just use Magic Touch.

    magictoolbox.com/magictouch/

    You only need a large image and a small image.

Similar Threads

  1. how to zoom using slider
    By kumar_gemi in forum New To Java
    Replies: 0
    Last Post: 07-11-2009, 10:06 PM
  2. How can we zoom a map using JSlider
    By barney in forum AWT / Swing
    Replies: 5
    Last Post: 02-23-2009, 01:48 PM
  3. Help with zoom in java
    By cachi in forum Enterprise JavaBeans (EJB)
    Replies: 3
    Last Post: 08-07-2008, 03:01 PM
  4. java: zoom type feature??
    By newtojava7 in forum Advanced Java
    Replies: 1
    Last Post: 04-02-2008, 05:15 PM
  5. zoom in swing
    By Alan in forum AWT / Swing
    Replies: 2
    Last Post: 05-31-2007, 02:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •