*
The moose likes Swing / AWT / SWT and the fly likes zoom in-out in jLayered pane Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "zoom in-out in jLayered pane" Watch "zoom in-out in jLayered pane" New topic
Author

zoom in-out in jLayered pane

Vaibhav Lad
Greenhorn

Joined: Sep 13, 2010
Posts: 4



This is my code.
In this I have created 3 layered pan.
1. contains nodes
2. Button as Cluster numbers
3. Zoom in -out button

I have created myCell class for creating Node objects. Everything is working fine right now.

Now we need to add zoom in - out facility into this. i.e. if user clicks on zoom in button than respective changes should be done to nodes in layered pane 1.


Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19718
    
  20

Please UseCodeTags. You can edit your post to add them. Make sure you add some line breaks to your array initializers so we won't get too long lines that will mess up the forum layout. You can use the preview to check if the lines are too long.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39393
    
  28
Rob Prime wrote:Please UseCodeTags. You can edit your post to add them. Make sure you add some line breaks to your array initializers so we won't get too long lines that will mess up the forum layout. You can use the preview to check if the lines are too long.
Shall I do it, since he's new?

And welcome to the Ranch, Vaibhav Lad
Vaibhav Lad
Greenhorn

Joined: Sep 13, 2010
Posts: 4
Help would be appreciated Campbell... you want me to make the code more readable???
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39393
    
  28
Vaibhav Lad wrote:Help would be appreciated Campbell... you want me to make the code more readable???
I've done it, by adding code tags and shortening the long lines (twice). Of course, there is nothing you can do to make NetBeans GUI builder code readable
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4638
    
    5

Campbell Ritchie wrote:Of course, there is nothing you can do to make NetBeans GUI builder code readable

Actually, there is. You can use a layout that generates less verbose code than GroupLayout, and you can remove the inane comments before posting on a forum.

And in this case, also remove the commented out imports and code.

I can't see anywhere the contents of that mammoth array are used either. I do see two places with p.length and one p[currentCluster].length.


luck, db
There are no new questions, but there may be new answers.
Vaibhav Lad
Greenhorn

Joined: Sep 13, 2010
Posts: 4
Basically what I am doing is , when user clicks on cluster number , with the use of p[] [] array particular array's elements are shown as nodes in first pane. You are right here I am not using that p[][] array. If you can run this program you will get a better idea. I need to zoom in - out the nodes in pane 1.
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4638
    
    5

Vaibhav Lad wrote:Basically what I am doing is , when user clicks on cluster number , with the use of p[] [] array particular array's elements are shown as nodes in first pane. You are right here I am not using that p[][] array. If you can run this program you will get a better idea. I need to zoom in - out the nodes in pane 1.

No thanks. If you can't take the trouble to create a proper SSCCE to post here, I can't take the trouble to wade through reams of irrelevant stuff.
Vaibhav Lad
Greenhorn

Joined: Sep 13, 2010
Posts: 4


I have done the corrections you guys wanted.... I thought previous code will give you guys some idea what I wanted to do.
So please help me now.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: zoom in-out in jLayered pane