Borders can be produced using the magic border command. Unlike many programs, this tool is interactive and can be used at any time to change existing borders or to add a second border.
You set the size of 3 boxes used to design the border. As you draw in the top left corner of the design, rotated versions appear in the other 3 corners. Drawing in the top box causes repeats to appear at regular intervals across the top of the design. These also appear reflected across the bottom. Finally, drawing in the bottom box causes repeats to appear at regular intervals down the left side of the design and a reflection down the right side.