How do i use a variable to press a key with robot class

hi,
do you use
import java.awt.Robot; ?
where do you want to press a key? in an another app?