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 Shapes with slider 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 "Shapes with slider" Watch "Shapes with slider" New topic

Shapes with slider

Ahmed Fayaz

Joined: May 22, 2009
Posts: 3
Can some one tell me how I am going to do the following .
I want use one JSlider to do three different tasks
I have created a rectangle a circle and a triangle.
I want circle to be zoomed and triangle to be moved horizontally and rectangle to be moved vertially.
Each one of this have a corresponding bustton and each will be activated when button is clicked.

The file that I am working is attached please help.
Ahmed Fayaz

Joined: May 22, 2009
Posts: 3
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
too much to wade through for me, so here's a simple demo of changing the size of the circle and the positions of the rectangle and triangle
(sizes of rectangle and triangle not changed, but easy enough to add)

Rob Spoor

Joined: Oct 27, 2005
Posts: 19655

Moving to the Swing forum.

How To Ask Questions How To Answer Questions
Consider Paul's rocket mass heater.
subject: Shapes with slider
Similar Threads
Help with Value Returning Methods
Singleton Factory Object
Generic methods and wildcards
Storing objects polymorphically in a Figure array
Polymorphism example