0

I have been working on ImageJ and need to add scroll bars in a plugin: Weka_segmentation It implements java.awt.Frame to ij.gui.ImageWindow, which is implemented by a stackwindow class, which is in turn implemented by a customwindow class. I have to add scroll bars in this class. Is there any east, short way?

mKorbel
  • 109,525
  • 20
  • 134
  • 319
user636177
  • 1
  • 1
  • 1

2 Answers2

3

Try this....

JScrollPane scroll = new JScrollPane(Component);

Component here will signify the one which needs scrolling...

Kumar Vivek Mitra
  • 33,294
  • 6
  • 48
  • 75
  • 1
    I think we should sort out whether Swing, AWT or a mixture is needed for this before jumping in with answers (that would create a mix of AWT & Swing). – Andrew Thompson Jul 02 '12 at 07:33
  • Ya thats absoultely right..... but i gave him a quick fix reply, that usually Works... , and it does ! But your point is absolutely right. – Kumar Vivek Mitra Jul 02 '12 at 07:42
  • thanks, but i can't get how to implement a scroll pane in the plugin, maybe you could take a look at the code, there's a customwindow class there that's used as the mane GUI pane – user636177 Jul 03 '12 at 05:14
  • Email the entire code on my email.. vivek.mitra786@gmail.com , i am at work now as soon as i get sometime i will implement it – Kumar Vivek Mitra Jul 03 '12 at 05:17
1

I'm the main developer of that plugin. Where do you want the scroll bars?

You may get a detailed answer if you write to the main Fiji developer list: https://groups.google.com/group/fiji-devel

ignacio