Zoom « JSlider « Java Swing Q&A





1. Mimicking Zoom bar from Office 2007 in Java (Modified JSlider)    stackoverflow.com

I'm attempting to mimic (or find a preexisting component) that mimics the zoom slider from Word 2007: Two state zoom bar There are two main differences between this component and a ...

2. How to zoom in and out the image in the line using JSlider in java?    stackoverflow.com

I have a diagonal line starting from the bottom left part going to the upper right corner of the screen. I have also a human image drawn to a canvas having ...

3. Zoom geometry using JSlider    coderanch.com

> I am sorry my code is too complex to make it as an example. guess: you're not using getValueIsAdjusting(), but guesses rarely solve problems, so here's a basic program - add your code to reproduce the problem, then post back so we can see what you're doing. import javax.swing.*; import java.awt.*; class Testing { public void buildGUI() { JSlider slider ...

4. How can we zoom a map using JSlider    java-forums.org

Java Code: import java.awt.*; import java.awt.event.*; import java.awt.geom.AffineTransform; import java.awt.image.BufferedImage; import java.io.*; import java.util.Hashtable; import javax.imageio.ImageIO; import javax.swing.*; import javax.swing.event.*; public class MapScale extends JPanel { BufferedImage image; double scale = 1.0; public MapScale(BufferedImage image) { this.image = image; } protected void paintComponent(Graphics g) { super.paintComponent(g); Graphics2D g2 = (Graphics2D)g; g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC); double x = (getWidth() - scale*image.getWidth())/2; double y = ...