From the home screen, press the Menu key.
Tap Location & Security.
Tap Set up Screen Lock.
Read the instructions and tap Next.
Tap and drag to draw the desired pattern.
To redraw the pattern, tap Retry. To accept the pattern, tap Continue.
Draw the same pattern again and tap Confirm.
Tap to check or uncheck the pattern options as desired.
The screen lock pattern is now set.