private void beginEdit(Figure figure) { if (fTextField == null) { fTextField = new FloatingTextField(); fTextField.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent event) { endEdit(); } }); } if (figure != fURLTarget && fURLTarget != null) { endEdit(); } if (figure != fURLTarget) { fTextField.createOverlay((Container) view()); fTextField.setBounds(fieldBounds(figure), getURL(figure)); fURLTarget = figure; } }