cxp108
发贴: 363
积分: 12
|
于 2003-10-14 10:58
在Applet中编写以下代码 public class ClusterParaDialog extends JDialog{ . . . . private class cycleSaNoTFInputVerifier extends InputVerifier{ . . . JOptionPane.showMessageDialog(ClusterParaDialog.this,"content","dialog",JOptionPane.INFORMATION_MESSAGE); . . . .
} . . } 编译通过了 运行环境:JRE 1.3.1 就不会出现问题,显示正常 但是运行环境1.4.0~2版本的JRE会出现以下问题:
---------------------------------------------------------------------------------------- Exception occurred during event dispatching:
java.lang.StackOverflowError
at sun.java2d.Disposer.add(Disposer.java:91)
at sun.java2d.Disposer.addRecord(Disposer.java:68)
at sun.awt.windows.Win32SurfaceData.initOps(Native Method)
at sun.awt.windows.Win32SurfaceData.<init>(Win32SurfaceData.java:432)
at sun.awt.windows.Win32SurfaceData.createData(Win32SurfaceData.java:311)
at sun.awt.windows.WComponentPeer.replaceSurfaceData(WComponentPeer.java:321)
at sun.awt.windows.WComponentPeer.setBounds(WComponentPeer.java:133)
at sun.awt.windows.WComponentPeer.initialize(WComponentPeer.java:523)
at sun.awt.windows.WCanvasPeer.initialize(WCanvasPeer.java:63)
at sun.awt.windows.WPanelPeer.initialize(WPanelPeer.java:57)
at sun.awt.windows.WWindowPeer.initialize(WWindowPeer.java:81)
at sun.awt.windows.WDialogPeer.initialize(WDialogPeer.java:48)
at sun.awt.windows.WComponentPeer.<init>(WComponentPeer.java:497)
at sun.awt.windows.WCanvasPeer.<init>(WCanvasPeer.java:29)
at sun.awt.windows.WPanelPeer.<init>(WPanelPeer.java:53)
at sun.awt.windows.WWindowPeer.<init>(WWindowPeer.java:77)
at sun.awt.windows.WDialogPeer.<init>(WDialogPeer.java:26)
at sun.awt.windows.WToolkit.createDialog(WToolkit.java:368)
at java.awt.Dialog.addNotify(Dialog.java:387)
at java.awt.Window.pack(Window.java:428)
at javax.swing.JOptionPane.createDialog(JOptionPane.java:899)
at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:819)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:624)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:595)
at com.cet.ui.ctcui.ClusterParaDialog$cycleSaNoTFInputVerifier.verify(ClusterParaDialog.java:1833)
at javax.swing.InputVerifier.shouldYieldFocus(InputVerifier.java:114)
at javax.swing.JComponent.runInputVerifier(JComponent.java:1104)
at javax.swing.JComponent.requestFocus(JComponent.java:1109)
at javax.swing.plaf.basic.BasicOptionPaneUI.selectInitialValue(BasicOptionPaneUI.java:849)
at javax.swing.JOptionPane.selectInitialValue(JOptionPane.java:2126)
at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:821)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:624)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:595)
at com.cet.ui.ctcui.ClusterParaDialog$cycleSaNoTFInputVerifier.verify(ClusterParaDialog.java:1833)
at javax.swing.InputVerifier.shouldYieldFocus(InputVerifier.java:114)
at javax.swing.JComponent.runInputVerifier(JComponent.java:1104)
at javax.swing.JComponent.requestFocus(JComponent.java:1109)
at javax.swing.plaf.basic.BasicOptionPaneUI.selectInitialValue(BasicOptionPaneUI.java:849)
at javax.swing.JOptionPane.selectInitialValue(JOptionPane.java:2126)
at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:821)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:624)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:595)
at com.cet.ui.ctcui.ClusterParaDialog$cycleSaNoTFInputVerifier.verify(ClusterParaDialog.java:1833)
at javax.swing.InputVerifier.shouldYieldFocus(InputVerifier.java:114)
at javax.swing.JComponent.runInputVerifier(JComponent.java:1104)
at javax.swing.JComponent.requestFocus(JComponent.java:1109)
at javax.swing.plaf.basic.BasicOptionPaneUI.selectInitialValue(BasicOptionPaneUI.java:849)
at javax.swing.JOptionPane.selectInitialValue(JOptionPane.java:2126)
at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:821)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:624)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:595)
at com.cet.ui.ctcui.ClusterParaDialog$cycleSaNoTFInputVerifier.verify(ClusterParaDialog.java:1833) ........ ------------------------------
这个问题困扰了小弟很久,希望众大虾们帮着做个试验,看看到底是不 是JRE的问题,还是小弟代码写得不当所至。
|