>>no need to call drawingPanel.getGraphics() in drawMap() because you
>have
>>alredy Graphics from paintComponent.
>
>>drawingPanel = new JPanel(){
>> public void paintComponent(Graphics g){
>> super.paintComponent(g);
>> drawMap((Graphics2D)g);
>> }
>> };
>
>>private void drawMap(Graphics2D g2){
>>g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALU
>E
>>ANTIALIAS_ON);
>> // custom paint code
>> }
>
>If I do this, nothing is drawn! It shouldn't have any effect on
>repainting overlapping areas, which is the problem I'm having. I'm just
>creating an extra Graphics object.
then use Graphics#create():
drawingPanel = new JPanel(){
public void paintComponent(Graphics g){
super.paintComponent(g);
drawMap((Graphics2D)g.create());
//or
//drawMap((Graphics2D)g.create(x, y, w, h));
}
};
===========================================================================
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".