Not quite sure what you mean in your question - doubling the pixel size is not the same as doubling the number of pixels (and, in your example you are actually increasing the number of pixels by 4, not 2).
Depending on what you need to do:
1. Expressing all your screen coordinates as a fraction of the
width and
height variables keeps your sketch scaled to whatever the current sketch size is. This is probably the simplest and most flexible approach to scaling. If you double the area of your applet, so the sketch will double in area.
2. If you really wish to zoom in (note though that zooming usually involves losing the edges of a sketch as they are scaled outside of the viewable area), then the scale
scale() method can be used inside
draw(). You may also wish to look at
http://www.soi.city.ac.uk/~jwo/processing/zoomPan for a zoom class that can be added to any sketch.
Apologies if I have misunderstood your question.