Assuming your painting your elements within the paintComponent method...
Create a new copy of the Graphics context...
Graphics2D g2d = (Graphics2D)g.create();
Create and apply you affine transformation...
AffineTransform at = anew AffineTransform();
at.translate(...);
at.scale(...);
g2d.setTransform(at);
Paint your element(s) and dispose of the Graphics context you have created...
//... Paint...
g2d.dispose();
Repeat as required.
The other method might be to get the current transformation and re-apply it when your done...
AffineTransform currenrAT = g2d.getTransform();
// Apply new transform and paint...
g2d.setTransform(currentAT);