Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.
I have looked in the mailing list without luck in solving this problem. Basically, I just want to have the visad panel resize when my application panel resize. This works in the first implementation of my application, where all of the visad stuff is in the same class as the entire JFrame which encloses it. However, since I didn't want to keep reinventing the wheel everytime I wanted to put a particular kind of visad picture in a panel, I separated out all the visad stuff into a separate class, called "DisplayThreeDimensionalSurface" which extends the JPanel class. Just before finishing up the constructor for this class, I do a add((JPanel) theDisplay.getComponent()); However, now the display no longer responds to changes in the size of the panel which contains it. It stays the same size no matter what (I'm not sure what size it is; perhaps 400x400, but this is not a number that appears anywhere in my code) Basically in my code for the frame containing the picture I do something like DisplayThreeDimensionalSurface threed = new DisplayThreeDimensionalSurface(); JPanel visadpictureholder = new JPanel(); visadpictureholder.add(threed); However even explicit calls to "visadpictureholder.resize(200,200)" do nothing. Also I tried when the DisplayThreeDimensionalSurface is initially created to do theDisplay.getComponent().setSize(100,100); this.setSize(100,100); this.setPreferredSize(new Dimension(100,100)); none of which changed the initial size of the visad picture. How can I force the size of the visad picture? Thanks in advance for any help Donna Donna L. Gresh, Ph.D. IBM T.J. Watson Research Center (914) 945-2472 http://www.research.ibm.com/people/g/donnagresh gresh@xxxxxxxxxx
visad
archives: