gotoDialog.setVisible(false);
int offset = 0; try { if (tf.getText().startsWith("-")) throw new NumberFormatException("Value is negative."); offset = regType.isSelected() ? Integer.parseInt(tf .getText(), 16) : HackModule.toRegPointer(Integer .parseInt(tf.getText(), 16)); } catch (NumberFormatException e) { if (tf.getText().charAt(0) == '-' || tf.getText().charAt(0) == '+') {   offset = si.address + cc.getStringLength(ta.getText(), useComp .isSelected(), 0, ta.getCaretPosition()); String tmp = tf.getText().substring(1); try { offset += (Integer.parseInt(tmp, 16) * (tf .getText().charAt(0) == '-' ? -1 : 1)); } catch (NumberFormatException e1) {} } } if (!gotoOffset(offset)) JOptionPane.showMessageDialog(gotoDialog, "The offset you entered is not " + "inside any text block.\n" + "Make sure you were using only " + "legal hexidecimal digits except\n" + "for a possible + or - prefix.", "Unable to find offset", JOptionPane.ERROR_MESSAGE); else gotoDialog.setVisible(false);
            public void actionPerformed(ActionEvent ae)            {                gotoDialog.setVisible(false);            }