posted 19 years ago
In my application
JFrame holdes JScrollPane called P1 .JFrame have BorderLayout .
P1 Scrollpane holdes Jpanel P2
Panel P2 holdes image .
When i add zoom effect to image ,that time panel should get Scroll bar but it doesn't showing it.
Some time it shows scrollbar but with out knob
class showZoomImage extends JPanel
{
Image img;
public void paint(Graphics g){
this.setPreferredSize(img.getWidth(),img.getHeight());
g.drawImage(img,width, height,this);
}
}