From: Timothy W. <tw...@us...> - 2006-03-20 21:24:09
|
Look at the source for JOptionPane.showXXXDialog() (the static methods). You will see: void showXXX() { JOptionPane pane = new JOptionPane(x, y, z); pane.showDialog(); } Which should make apparent why you get a new JOptionPane every time the showXXX method is invoked. On Mar 20, 2006, at 12:05 PM, Halbert, Jeannie wrote: > > I just don't understand why there are two JOptionPanes in the > AWTHierarchy. When I run these iterations I get a different number of > JOptionPanes in the hierarchy depending upon the run, and if I run the > code through debugger it is different also. There seems to be some > lag? before these JOptionPanes are cleaned from the hierarchy. > >> >> -----Original Message----- >> From: Timothy Wall [mailto:tw...@us...] >> >> JOptionPane has several static methods which creat a new JOptionPane >> and a new Dialog on each invocation. >> |