Well I wrote earlier for some help on figuring out how to get my program to pan an
image after being zoomed by using scroll bars. As of now I have gotten the scroll
abrs to appear after a zoom but they don't appear until the mouse is moved over
them....Also some of the other functionality doesn't work properly while the
scrollPane is implemented. I will post some of the code of my ImageManip2D class
where the scrollpane is decalred and created. Any help would be great....i was told I
may be having such problems because my component class, imageCanvas is custom designed
and is not one of those created inside the JAVA API. Anyways, I'll leave it at that.
Thanks.
public class ImageManip2D extends ImageViewer2D
/*implements PropertyChangeListener*/{
//protected JTextArea vmMessageBar;
//protected JTextArea pzMessageBar;
//protected JTextArea mnpMessageBar;
protected JFrame ilFrame;
protected PanZoom panZoom;
//protected GeomManip manip;
protected JFrame lensFrame;
protected JFrame manipFrame;
protected JFrame filtersFrame;
protected LensPanel lensPanel;
protected JScrollPane scrollPane;
public static void main(String[] args){ ImageManip2D iv = new ImageManip2D();}
public ImageManip2D() { init(); }
public void init(){
panZoom = new PanZoom((ImageManipulator)viewerPane);
//this.updateMessageBar();
//viewerPane.addPropertyChangeListener(this);
repaint();
}
protected void createGUI(){
//createImageLoader();
ViewerMenuBar viewerMenuBar = new ViewerMenuBar();
setJMenuBar((JMenuBar)viewerMenuBar);
Dimension ssize= Toolkit.getDefaultToolkit().getScreenSize();
this.setLocation((ssize.width/8),
(ssize.height/8));
this.setSize((int)(ssize.width*3/4.0), (int)(ssize.height*3/4.0));
viewerPane = new ImageCanvas2D();
JPanel mbpan = new JPanel();
scrollPane = new JScrollPane();
/*this.getContentPane().add(scrollPane);
scrollPane.add(viewerPane);
this.getContentPane().add(viewerPane);
*/
this.getContentPane().add(new JScrollPane(viewerPane));
this.getContentPane().add(mbpan, BorderLayout.SOUTH);
JButton filters = new JButton("Filters");
mbpan.add(filters);
this.show();
this.repaint();
*****************************************************************************
David Braun-Friedman
Programador de Telecomunicaciones
Departamento de Electr�nica y Comunicaciones
Email (CEIT): [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
Email (Fuera): [EMAIL PROTECTED]
Tlfno: 943 212 800 Extensi�n: 289
M�vil: 628527739
Centro de Estudios e Investigaciones T�cnicas C.E.I.T.
Paseo Manuel de Lardizabal, 15
20018 San Sebastian
*****************************************************************************
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".