question: public void changeState ( ) { linked = ! linked ; link = linked ? linkedImIc . getImage ( ) : unlinkedImIc . getImage ( ) ; repaint ( ) ; }
target:  Changes the lock icon's image to whatever it currently is not. Also changes the locked flag accordingly.