Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

zoom in-out in jLayered pane

 
Vaibhav Lad
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



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
Pie
Posts: 20667
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Campbell Ritchie
Sheriff
Pie
Posts: 50241
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Help would be appreciated Campbell... you want me to make the code more readable???
 
Campbell Ritchie
Sheriff
Pie
Posts: 50241
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5148
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Vaibhav Lad
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5148
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic