File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Murach's Java Servlets and JSP this week in the Servlets 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: 19651

Moving to the Swing forum.

How To Ask Questions How To Answer Questions
jQuery in Action, 2nd edition
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