aspose file tools*
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 Java 8 in Action this week in the Java 8 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: 19556

Moving to the Swing forum.

How To Ask Questions How To Answer Questions
I agree. Here's the link:
subject: Shapes with slider
Similar Threads
Singleton Factory Object
Generic methods and wildcards
Polymorphism example
Help with Value Returning Methods
Storing objects polymorphically in a Figure array