This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Zoom geometry using JSlider Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Zoom geometry using JSlider" Watch "Zoom geometry using JSlider" New topic

Zoom geometry using JSlider

Hui Zhao
Ranch Hand

Joined: Jul 09, 2007
Posts: 116

I want to design a JSlider to zoom in or out polygons.What I expected is the old drawing would be replaced the new drawing.
Actually I use repaint() method, however I found the screen was mess up.
The new and old pictures coexisted when I fired the event.

What is the reason it could be?
I am sorry my code is too complex to make it as an example.

Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> 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.

I agree. Here's the link:
subject: Zoom geometry using JSlider
Similar Threads
how to resize a JSlider
Dynamically Shrinking JPanels
Is there a horizontal slider?
Problem in changing forground color of JSlider!!
AWT Event look for help