>drawingPanel = new JPanel(){
> public void paintComponent(Graphics g){
> super.paintComponent(g);
> drawMap();
> }
> };
>
>private void drawMap(){
> Graphics2D g2 = (Graphics2D) drawingPanel.getGraphics();
>
>g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE
>_ANTIALIAS_ON);
> // custom paint code
> }
>
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.VALUE
_ANTIALIAS_ON);
// custom paint code
}
===========================================================================
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".