| Author |
JDialog with ClassCastException ?!??!
|
Peter Primrose
Ranch Hand
Joined: Sep 10, 2004
Posts: 755
|
|
Guys, I want to invoke a jdialog and I'm using this line of code: Component c = SwingUtilities.getRoot((Component)e.getSource()); JDialog subDialog = (JDialog)c; It works GREAT in the entire project; but for some reason, in diff class I get this message: java.lang.ClassCastException at CustomizeAgent.actionPerformed(CustomizeAgent.java:315) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)... WHY??? any idea how to correct it?
|
 |
Don Kiddick
Ranch Hand
Joined: Dec 12, 2002
Posts: 580
|
|
|
the root of e.getSource() is not a JDialog
|
 |
Peter Primrose
Ranch Hand
Joined: Sep 10, 2004
Posts: 755
|
|
:-( ohhhhhhhhhhh right!!! thanks - I corrected it and it works. gggggggggggggggg
|
 |
 |
|
|
subject: JDialog with ClassCastException ?!??!
|
|
|