<font face="Courier New">((contact instanceof Person) ? (PersonPanel)contactPanel : contactPanel).setContact(contact);</font>
Really ugly code. What if contactPanel is NOT a PersonPanel? You get an exception.
If ContactPanel has a mthod setContact, and PersonPanel does not, then there is no need for the cast at all. Just write contactPanel.setContact(contact).
Otherwise, PersonPanel overrides the setContact method for a reason; so it is still appropriate to call contactPanel.setContact(contact).
The object contactPanel knows whether it is a PersonPanel or a contactPanel, and so calls the method appropriately. If I don't see ANY need for the above code at all.