I don't know if this belongs here or under Other API's. Sorry if this is the wrong forum.
I am learing JAI right now. That is the purpose of the following code. Please ignore the fact that I am turning something into a ByteArraySeekableStream when I really don't have to. I did that to see what to expect when my server socket sends down multi-page ByteArraySeekableStreams (I wanted to know if JAI could tell where one page starts and another begins with such a stream). The same is true for why I turn a RenderedImage to a PlanarImage (I am just testing and figuring out here).
Now I am trying to learn how to use the ScrollPane to work with the images I build. I have done several things trying to get ScrollPane to set its size to other than the size of the image. The convoluted code below just arbitrarily tries to set it to half the size of the image. But, it always grows to the size of the image no matter how I try to go about making its size static.
What I get when I run above is all images of my multipage tiff loaded in individual scrollpanes that are as large as the images. Can someone give me some feedback that may solve my problem?