import java.awt.Dimension; public class Expand extends Command { private static SizeInputDialog ourDialog = new SizeInputDialog("Resize Scale Input", " scale width by", "scale height by"); public Expand () { super("Resize"); } public void execute (Pixmap target) { ourDialog.show(); Dimension scale = ourDialog.getSize(); Dimension oldSize = target.getSize(); target.setSize(oldSize.width * scale.width, oldSize.height * scale.height); // TODO: fill in enlarged pixmap by copying current colors into empty space // so each takes up scale space in the new pixmap } }