Greetings, Kenneth and others, Thanks for the quick response, although, let me redirect the intent of what I am looking for in a response... Some times doing something in Java in ImageJ just works if you get the steps just right; lifting code snippets from publicly available code is a great way of accomplishing this - although this requires finding this code. When writing the code simply from reading the documentation sometimes only kinda-sorta works, and you spend way to much time trying to get it to work.
For example, some times opening a series of ImagePlus(s) (which includes zooming) one of the ImageWindows which exists and is displayed, albeit the ImageWindow is a couple of pixels width and the canvas size is something like -1,35 (from memory 35 is the height of the title bar). In this condition, using ic.zoom100Percent() alone does not resize the window. But if, when detected, you set the canvas size to something legit, ic.setSize(imp.getWidth(),imp.getHeight()), the ic.zoom100Percent() works as expected, n.b., any legit size works. During the debugging, I noticed that if I can make said ImageWindow active and use the GUI Image>Zoom>View 100% it seems to always zooms to 100%; Why this GUI works and not what is supposedly called does not??? So, if someone has code snippets that can replicate the specific geometry and zoom conditions, and/ot place something visible (but does not modify / function) at a point in said other window, and is willing to share, my happiness level will rise significantly. When I asked for code snippet for scrolling large tables within a Panel, something I struggled with, Curtis provided a code snippet that worked perfectly, Thanks again Curtis... Thanks in advance, Fred On Mon, December 8, 2025 3:23 am, Kenneth Sloan wrote: > The way I do this is: > > a) define a Class that extends ImageWindow > b) define methods such as âSetZoom(â¦)â, and âSetCursorâ > c) define methods such as âLinkToWindow(MyImageWindow) > d) In the code that creates each such window, use âLinkToWindowâ to > tell all the windows about each other > e) in the MyImageWindow class, catch all of the changes you want to > handle, and notify all of the windows you are linked to. BEWARE OF > LOOPS. > > If there is a better way to do this kind of thing, Iâm all ears - but > this has worked for me. > > Note: I do this for a slightly different reason, but the general idea is > to: > > a) create an extension class > b) link the windows > c) modify the extension class to accept the links, capture the changes, > and communicate them. > > -- > Kenneth Sloan > [email protected] > Vision is the art of seeing what is invisible to others. > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html
