R
Rajesh.Rapaka
HI all,
I am having a Frame in which there is a JScrollPane in which there is a
JPanel. Now in the frame I have some toolbars and menus. And I want to
draw an Image in the JPanel only.
So I've used paintComponents.
code:
public void function(){
Graphics g = bufImage.getGraphics();
g.drawImage(bufImage,null,null);
this.jpanel1.paintComponents(g);
}
public void paintComponents(Graphics g){
g.drawImage(bufImage,0,0,wt,ht,null);
}
But I see the paintComponents function is not called. How can this be
triggered. and how can i draw the image on the jpanel1.
plz help
regards
Rajesh Rapaka.
I am having a Frame in which there is a JScrollPane in which there is a
JPanel. Now in the frame I have some toolbars and menus. And I want to
draw an Image in the JPanel only.
So I've used paintComponents.
code:
public void function(){
Graphics g = bufImage.getGraphics();
g.drawImage(bufImage,null,null);
this.jpanel1.paintComponents(g);
}
public void paintComponents(Graphics g){
g.drawImage(bufImage,0,0,wt,ht,null);
}
But I see the paintComponents function is not called. How can this be
triggered. and how can i draw the image on the jpanel1.
plz help
regards
Rajesh Rapaka.