((com = (JComponent)p.getVisualComponent()) != null)
What you trying to achieve with this line? Are you trying to assign JComponent to com variable if result is not null?
I do not think second part sufficient to locate problem.
PS: It is not recommended to mix SWING and AWT.
Moderator
Featured Poster
Reputation Points: 2786
Solved Threads: 871
Code tags enforcer
Offline 6,653 posts
since Dec 2004