swing- 执行到 NativeInterface.runEventPump 页面卡死

问题描述

执行到 NativeInterface.runEventPump 页面卡死

最近公司要做一个C/S架构的系统,需要一个swing的浏览器,在网上找到了一段代码,不明白单独运行打开的时候没有问题,但是将浏览器绑定到一个组件上,点击组件打开就页面卡死,不会动了,求指教,代码如下:
Swing浏览器:

import java.awt.BorderLayout;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.ScrollPaneConstants;
import javax.swing.SwingUtilities;  

import chrriis.common.UIUtils;
import chrriis.dj.nativeswing.swtimpl.NativeInterface;
import chrriis.dj.nativeswing.swtimpl.components.JWebBrowser;  

public class ReportPreviewUtil extends JPanel {  

    private static final long serialVersionUID = 1L; 

    private static ReportPreviewUtil reportPreviewUtil ;

    static String name ;

    static String URL ;

    public static ReportPreviewUtil getInstance(String title,String url){
        name = title;
        URL = url ;
        if(null == reportPreviewUtil){
            reportPreviewUtil = new ReportPreviewUtil();
        }
        return reportPreviewUtil ;
    }

    static String url ;

    public ReportPreviewUtil() {  

        super(new BorderLayout());
        JScrollPane webBrowserPanel = new JScrollPane();
        webBrowserPanel.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
        final JWebBrowser webBrowser = new JWebBrowser();  

        webBrowser.setBarsVisible(false);
        webBrowser.navigate(URL);
        add(webBrowser, BorderLayout.CENTER);
    }  

    public static void get() {
        UIUtils.setPreferredLookAndFeel();
        NativeInterface.open();
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                JFrame frame = new JFrame(name);
                frame.setUndecorated(true);// 禁用此窗体的装饰
                frame.setLocationRelativeTo(null);//居中显示
                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                frame.getContentPane().add(new ReportPreviewUtil(), BorderLayout.CENTER);  

                frame.setSize(938, 614);  

                frame.setLocationByPlatform(true);
                frame.setVisible(true);
            }
        });
        NativeInterface.runEventPump();
    }  

    public static void main(String[] args) {
        ReportPreviewUtil.getInstance("", "http://www.baidu.com").get();
    }
}

按钮组件绑定后,调用:

 private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
        ReportPreviewUtil.getInstance("", "http://www.baidu.com").get();
    }

在ReportPreviewUtil中的main方法运行正常,通过按钮执行就页面卡死,为什么呢?

解决方案

SwingUtilities的invokeLater和invokeAndWait
java学习之路6-SwingUtilities中invokeLater和invokeAndWait

解决方案二:

阻塞执行了 我之前碰到类似的问题 导致 界面阻塞 一直加载不出来~~
然后就直接开线程 去处理了~写了一个继承Thread的内部类,
然后里面处理业务逻辑,你再在invokeLater里面 实例化这个线程并start~~
貌似可以解决~

解决方案三:

SWING是单线程的,你还是将get方法中的内容用thread包一下就可以了。如下:

new Thread(){
            @Override
            public void run() {
 UIUtils.setPreferredLookAndFeel();
        NativeInterface.open();
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                JFrame frame = new JFrame(name);
                frame.setUndecorated(true);// 禁用此窗体的装饰
                frame.setLocationRelativeTo(null);//居中显示
                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                frame.getContentPane().add(new ReportPreviewUtil(), BorderLayout.CENTER);  

                frame.setSize(938, 614);  

                frame.setLocationByPlatform(true);
                frame.setVisible(true);
            }
        });
        NativeInterface.runEventPump();
                }
        }.start();

解决方案四:

感谢 @Varlinor,@那一抹代码 但是这个方法我也试过了,不行,会报一下错误:

    at sun.reflect.DelegatingMethodAccessorImpl.invoke

(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:279)
    at javax.swing.UIDefaults.getUI(UIDefaults.java:771)
    at javax.swing.UIManager.getUI(UIManager.java:1013)
    at javax.swing.JToolBar.updateUI(JToolBar.java:192)
    at javax.swing.JToolBar.<init>(JToolBar.java:158)
    at javax.swing.JToolBar.<init>(JToolBar.java:119)
    at javax.swing.JToolBar.<init>(JToolBar.java:107)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator

$WebBrowserButtonBar.<init>(DefaultWebBrowserDecorator.java:371)
    at 

chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator.setButtonBarVisible

(DefaultWebBrowserDecorator.java:667)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator.<init>

(DefaultWebBrowserDecorator.java:573)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.createWebBrowserDecorator

(JWebBrowser.java:112)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.<init>

(JWebBrowser.java:191)
    at com.lida.util.ReportPreviewUtil.<init>(ReportPreviewUtil.java:45)
    at com.lida.util.ReportPreviewUtil.getInstance(ReportPreviewUtil.java:32)
    at com.lida.main.branch.report.dailyschedule.thread.DailyScheduleReportThread.run

(DailyScheduleReportThread.java:10)
    at java.lang.Thread.run(Thread.java:745)
UIDefaults.getUI() failed: createUI() failed for 

chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator$WebBrowserButtonBar

[,0,0,0x0,invalid,layout=javax.swing.JToolBar

$DefaultToolBarLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumSize=,minimumSiz

e=,preferredSize=,floatable=true,margin=,orientation=HORIZONTAL,paintBorder=true] 

java.lang.reflect.InvocationTargetException
java.lang.Error
    at javax.swing.UIDefaults.getUIError(UIDefaults.java:732)
    at javax.swing.MultiUIDefaults.getUIError(MultiUIDefaults.java:130)
    at javax.swing.UIDefaults.getUI(UIDefaults.java:777)
    at javax.swing.UIManager.getUI(UIManager.java:1013)
    at javax.swing.JToolBar.updateUI(JToolBar.java:192)
    at javax.swing.JToolBar.<init>(JToolBar.java:158)
    at javax.swing.JToolBar.<init>(JToolBar.java:119)
    at javax.swing.JToolBar.<init>(JToolBar.java:107)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator

$WebBrowserButtonBar.<init>(DefaultWebBrowserDecorator.java:371)
    at 

chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator.setButtonBarVisible

(DefaultWebBrowserDecorator.java:667)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator.<init>

(DefaultWebBrowserDecorator.java:573)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.createWebBrowserDecorator

(JWebBrowser.java:112)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.<init>

(JWebBrowser.java:191)
    at com.lida.util.ReportPreviewUtil.<init>(ReportPreviewUtil.java:45)
    at com.lida.util.ReportPreviewUtil.getInstance(ReportPreviewUtil.java:32)
    at com.lida.main.branch.report.dailyschedule.thread.DailyScheduleReportThread.run

(DailyScheduleReportThread.java:10)
    at java.lang.Thread.run(Thread.java:745)
org.jvnet.substance.api.UiThreadingViolationException: Component creation must be done on 

Event Dispatch Thread
    at 

org.jvnet.substance.utils.SubstanceCoreUtilities.testComponentCreationThreadingViolation

(SubstanceCoreUtilities.java:2368)
    at org.jvnet.substance.SubstanceButtonUI.createUI(SubstanceButtonUI.java:122)
    at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke

(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:75)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke

(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:279)
    at javax.swing.UIDefaults.getUI(UIDefaults.java:771)
    at javax.swing.UIManager.getUI(UIManager.java:1013)
    at javax.swing.JButton.updateUI(JButton.java:146)
    at javax.swing.AbstractButton.init(AbstractButton.java:2172)
    at javax.swing.JButton.<init>(JButton.java:136)
    at javax.swing.JButton.<init>(JButton.java:90)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator

$WebBrowserButtonBar.<init>(DefaultWebBrowserDecorator.java:373)
    at 

chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator.setButtonBarVisible

(DefaultWebBrowserDecorator.java:667)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator.<init>

(DefaultWebBrowserDecorator.java:573)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.createWebBrowserDecorator

(JWebBrowser.java:112)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.<init>

(JWebBrowser.java:191)
    at com.lida.util.ReportPreviewUtil.<init>(ReportPreviewUtil.java:45)
    at com.lida.util.ReportPreviewUtil.getInstance(ReportPreviewUtil.java:32)
    at com.lida.main.branch.report.dailyschedule.thread.DailyScheduleReportThread.run

(DailyScheduleReportThread.java:10)
    at java.lang.Thread.run(Thread.java:745)
UIDefaults.getUI() failed: createUI() failed for javax.swing.JButton

[,0,0,0x0,invalid,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumSize=,minimumSize=,p

referredSize=,defaultIcon=,disabledIcon=,disabledSelectedIcon=,margin=null,paintBorder=true

,paintFocus=true,pressedIcon=,rolloverEnabled=false,rolloverIcon=,rolloverSelectedIcon=,sel

ectedIcon=,text=,defaultCapable=true] java.lang.reflect.InvocationTargetException
java.lang.Error
    at javax.swing.UIDefaults.getUIError(UIDefaults.java:732)
    at javax.swing.MultiUIDefaults.getUIError(MultiUIDefaults.java:130)
    at javax.swing.UIDefaults.getUI(UIDefaults.java:777)
    at javax.swing.UIManager.getUI(UIManager.java:1013)
    at javax.swing.JButton.updateUI(JButton.java:146)
    at javax.swing.AbstractButton.init(AbstractButton.java:2172)
    at javax.swing.JButton.<init>(JButton.java:136)
    at javax.swing.JButton.<init>(JButton.java:90)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator

$WebBrowserButtonBar.<init>(DefaultWebBrowserDecorator.java:373)
    at 

chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator.setButtonBarVisible

(DefaultWebBrowserDecorator.java:667)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator.<init>

(DefaultWebBrowserDecorator.java:573)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.createWebBrowserDecorator

(JWebBrowser.java:112)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.<init>

(JWebBrowser.java:191)
    at com.lida.util.ReportPreviewUtil.<init>(ReportPreviewUtil.java:45)
    at com.lida.util.ReportPreviewUtil.getInstance(ReportPreviewUtil.java:32)
    at com.lida.main.branch.report.dailyschedule.thread.DailyScheduleReportThread.run

(DailyScheduleReportThread.java:10)
    at java.lang.Thread.run(Thread.java:745)
org.jvnet.substance.api.UiThreadingViolationException: Component creation must be done on 

Event Dispatch Thread
    at 

org.jvnet.substance.utils.SubstanceCoreUtilities.testComponentCreationThreadingViolation

(SubstanceCoreUtilities.java:2368)
    at org.jvnet.substance.SubstanceButtonUI.createUI(SubstanceButtonUI.java:122)
    at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke

(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:75)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke

(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:279)
    at javax.swing.UIDefaults.getUI(UIDefaults.java:771)
    at javax.swing.UIManager.getUI(UIManager.java:1013)
    at javax.swing.JButton.updateUI(JButton.java:146)
    at javax.swing.AbstractButton.init(AbstractButton.java:2172)
    at javax.swing.JButton.<init>(JButton.java:136)
    at javax.swing.JButton.<init>(JButton.java:90)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator

$WebBrowserButtonBar.<init>(DefaultWebBrowserDecorator.java:382)
    at 

chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator.setButtonBarVisible

(DefaultWebBrowserDecorator.java:667)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator.<init>

(DefaultWebBrowserDecorator.java:573)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.createWebBrowserDecorator

(JWebBrowser.java:112)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.<init>

(JWebBrowser.java:191)
    at com.lida.util.ReportPreviewUtil.<init>(ReportPreviewUtil.java:45)
    at com.lida.util.ReportPreviewUtil.getInstance(ReportPreviewUtil.java:32)
    at com.lida.main.branch.report.dailyschedule.thread.DailyScheduleReportThread.run

(DailyScheduleReportThread.java:10)
    at java.lang.Thread.run(Thread.java:745)
UIDefaults.getUI() failed: createUI() failed for javax.swing.JButton

[,0,0,0x0,invalid,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumSize=,minimumSize=,p

referredSize=,defaultIcon=,disabledIcon=,disabledSelectedIcon=,margin=null,paintBorder=true

,paintFocus=true,pressedIcon=,rolloverEnabled=false,rolloverIcon=,rolloverSelectedIcon=,sel

ectedIcon=,text=,defaultCapable=true] java.lang.reflect.InvocationTargetException
java.lang.Error
    at javax.swing.UIDefaults.getUIError(UIDefaults.java:732)
    at javax.swing.MultiUIDefaults.getUIError(MultiUIDefaults.java:130)
    at javax.swing.UIDefaults.getUI(UIDefaults.java:777)
    at javax.swing.UIManager.getUI(UIManager.java:1013)
    at javax.swing.JButton.updateUI(JButton.java:146)
    at javax.swing.AbstractButton.init(AbstractButton.java:2172)
    at javax.swing.JButton.<init>(JButton.java:136)
    at javax.swing.JButton.<init>(JButton.java:90)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator

$WebBrowserButtonBar.<init>(DefaultWebBrowserDecorator.java:382)
    at 

chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator.setButtonBarVisible

(DefaultWebBrowserDecorator.java:667)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator.<init>

(DefaultWebBrowserDecorator.java:573)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.createWebBrowserDecorator

(JWebBrowser.java:112)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.<init>

(JWebBrowser.java:191)
    at com.lida.util.ReportPreviewUtil.<init>(ReportPreviewUtil.java:45)
    at com.lida.util.ReportPreviewUtil.getInstance(ReportPreviewUtil.java:32)
    at com.lida.main.branch.report.dailyschedule.thread.DailyScheduleReportThread.run

(DailyScheduleReportThread.java:10)
    at java.lang.Thread.run(Thread.java:745)
org.jvnet.substance.api.UiThreadingViolationException: Component creation must be done on 

Event Dispatch Thread
    at 

org.jvnet.substance.utils.SubstanceCoreUtilities.testComponentCreationThreadingViolation

(SubstanceCoreUtilities.java:2368)
    at org.jvnet.substance.SubstanceButtonUI.createUI(SubstanceButtonUI.java:122)
    at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke

(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:75)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke

(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:279)
    at javax.swing.UIDefaults.getUI(UIDefaults.java:771)
    at javax.swing.UIManager.getUI(UIManager.java:1013)
    at javax.swing.JButton.updateUI(JButton.java:146)
    at javax.swing.AbstractButton.init(AbstractButton.java:2172)
    at javax.swing.JButton.<init>(JButton.java:136)
    at javax.swing.JButton.<init>(JButton.java:90)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator

$WebBrowserButtonBar.<init>(DefaultWebBrowserDecorator.java:391)
    at 

chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator.setButtonBarVisible

(DefaultWebBrowserDecorator.java:667)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator.<init>

(DefaultWebBrowserDecorator.java:573)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.createWebBrowserDecorator

(JWebBrowser.java:112)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.<init>

(JWebBrowser.java:191)
    at com.lida.util.ReportPreviewUtil.<init>(ReportPreviewUtil.java:45)
    at com.lida.util.ReportPreviewUtil.getInstance(ReportPreviewUtil.java:32)
    at com.lida.main.branch.report.dailyschedule.thread.DailyScheduleReportThread.run

(DailyScheduleReportThread.java:10)
    at java.lang.Thread.run(Thread.java:745)
UIDefaults.getUI() failed: createUI() failed for javax.swing.JButton

[,0,0,0x0,invalid,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumSize=,minimumSize=,p

referredSize=,defaultIcon=,disabledIcon=,disabledSelectedIcon=,margin=null,paintBorder=true

,paintFocus=true,pressedIcon=,rolloverEnabled=false,rolloverIcon=,rolloverSelectedIcon=,sel

ectedIcon=,text=,defaultCapable=true] java.lang.reflect.InvocationTargetException
java.lang.Error
    at javax.swing.UIDefaults.getUIError(UIDefaults.java:732)
    at javax.swing.MultiUIDefaults.getUIError(MultiUIDefaults.java:130)
    at javax.swing.UIDefaults.getUI(UIDefaults.java:777)
    at javax.swing.UIManager.getUI(UIManager.java:1013)
    at javax.swing.JButton.updateUI(JButton.java:146)
    at javax.swing.AbstractButton.init(AbstractButton.java:2172)
    at javax.swing.JButton.<init>(JButton.java:136)
    at javax.swing.JButton.<init>(JButton.java:90)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator

$WebBrowserButtonBar.<init>(DefaultWebBrowserDecorator.java:391)
    at 

chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator.setButtonBarVisible

(DefaultWebBrowserDecorator.java:667)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator.<init>

(DefaultWebBrowserDecorator.java:573)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.createWebBrowserDecorator

(JWebBrowser.java:112)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.<init>

(JWebBrowser.java:191)
    at com.lida.util.ReportPreviewUtil.<init>(ReportPreviewUtil.java:45)
    at com.lida.util.ReportPreviewUtil.getInstance(ReportPreviewUtil.java:32)
    at com.lida.main.branch.report.dailyschedule.thread.DailyScheduleReportThread.run

(DailyScheduleReportThread.java:10)
    at java.lang.Thread.run(Thread.java:745)
org.jvnet.substance.api.UiThreadingViolationException: Component creation must be done on 

Event Dispatch Thread
    at 

org.jvnet.substance.utils.SubstanceCoreUtilities.testComponentCreationThreadingViolation

(SubstanceCoreUtilities.java:2368)
    at org.jvnet.substance.SubstanceButtonUI.createUI(SubstanceButtonUI.java:122)
    at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke

(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:75)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke

(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:279)
    at javax.swing.UIDefaults.getUI(UIDefaults.java:771)
    at javax.swing.UIManager.getUI(UIManager.java:1013)
    at javax.swing.JButton.updateUI(JButton.java:146)
    at javax.swing.AbstractButton.init(AbstractButton.java:2172)
    at javax.swing.JButton.<init>(JButton.java:136)
    at javax.swing.JButton.<init>(JButton.java:90)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator

$WebBrowserButtonBar.<init>(DefaultWebBrowserDecorator.java:399)
    at 

chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator.setButtonBarVisible

(DefaultWebBrowserDecorator.java:667)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator.<init>

(DefaultWebBrowserDecorator.java:573)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.createWebBrowserDecorator

(JWebBrowser.java:112)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.<init>

解决方案五:

我找了下网上的资料,说是NativeInterface.runEventPump不支持并发。我尝试把NativeInterface.runEventPump();注释掉(我不明白这个代码什么意思),会报一下错误:

    at javax.swing.JMenu.ensurePopupMenuCreated(JMenu.java:545)
    at javax.swing.JMenu.add(JMenu.java:578)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator$WebBrowserMenuBar.<init>(DefaultWebBrowserDecorator.java:267)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator.<init>(DefaultWebBrowserDecorator.java:565)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.createWebBrowserDecorator(JWebBrowser.java:112)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.<init>(JWebBrowser.java:191)
    at com.lida.util.ReportPreviewUtil.<init>(ReportPreviewUtil.java:45)
    at com.lida.util.ReportPreviewUtil.getInstance(ReportPreviewUtil.java:32)
    at com.lida.main.branch.report.dailyschedule.thread.DailyScheduleReportThread.run(DailyScheduleReportThread.java:10)
    at java.lang.Thread.run(Thread.java:745)
org.jvnet.substance.api.UiThreadingViolationException: Component creation must be done on Event Dispatch Thread
    at org.jvnet.substance.utils.SubstanceCoreUtilities.testComponentCreationThreadingViolation(SubstanceCoreUtilities.java:2368)
    at org.jvnet.substance.SubstanceCheckBoxMenuItemUI.createUI(SubstanceCheckBoxMenuItemUI.java:82)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:75)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:279)
    at javax.swing.UIDefaults.getUI(UIDefaults.java:771)
    at javax.swing.UIManager.getUI(UIManager.java:1013)
    at javax.swing.JMenuItem.updateUI(JMenuItem.java:249)
    at javax.swing.JMenuItem.init(JMenuItem.java:211)
    at javax.swing.JMenuItem.<init>(JMenuItem.java:150)
    at javax.swing.JCheckBoxMenuItem.<init>(JCheckBoxMenuItem.java:164)
    at javax.swing.JCheckBoxMenuItem.<init>(JCheckBoxMenuItem.java:104)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator$WebBrowserMenuBar.<init>(DefaultWebBrowserDecorator.java:268)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator.<init>(DefaultWebBrowserDecorator.java:565)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.createWebBrowserDecorator(JWebBrowser.java:112)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.<init>(JWebBrowser.java:191)
    at com.lida.util.ReportPreviewUtil.<init>(ReportPreviewUtil.java:45)
    at com.lida.util.ReportPreviewUtil.getInstance(ReportPreviewUtil.java:32)
    at com.lida.main.branch.report.dailyschedule.thread.DailyScheduleReportThread.run(DailyScheduleReportThread.java:10)
    at java.lang.Thread.run(Thread.java:745)
UIDefaults.getUI() failed: createUI() failed for javax.swing.JCheckBoxMenuItem[,0,0,0x0,invalid,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,disabledSelectedIcon=,margin=null,paintBorder=false,paintFocus=false,pressedIcon=,rolloverEnabled=false,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=] java.lang.reflect.InvocationTargetException
java.lang.Error
    at javax.swing.UIDefaults.getUIError(UIDefaults.java:732)
    at javax.swing.MultiUIDefaults.getUIError(MultiUIDefaults.java:130)
    at javax.swing.UIDefaults.getUI(UIDefaults.java:777)
    at javax.swing.UIManager.getUI(UIManager.java:1013)
    at javax.swing.JMenuItem.updateUI(JMenuItem.java:249)
    at javax.swing.JMenuItem.init(JMenuItem.java:211)
    at javax.swing.JMenuItem.<init>(JMenuItem.java:150)
    at javax.swing.JCheckBoxMenuItem.<init>(JCheckBoxMenuItem.java:164)
    at javax.swing.JCheckBoxMenuItem.<init>(JCheckBoxMenuItem.java:104)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator$WebBrowserMenuBar.<init>(DefaultWebBrowserDecorator.java:268)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator.<init>(DefaultWebBrowserDecorator.java:565)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.createWebBrowserDecorator(JWebBrowser.java:112)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.<init>(JWebBrowser.java:191)
    at com.lida.util.ReportPreviewUtil.<init>(ReportPreviewUtil.java:45)
    at com.lida.util.ReportPreviewUtil.getInstance(ReportPreviewUtil.java:32)
    at com.lida.main.branch.report.dailyschedule.thread.DailyScheduleReportThread.run(DailyScheduleReportThread.java:10)
    at java.lang.Thread.run(Thread.java:745)
org.jvnet.substance.api.UiThreadingViolationException: Component creation must be done on Event Dispatch Thread
    at org.jvnet.substance.utils.SubstanceCoreUtilities.testComponentCreationThreadingViolation(SubstanceCoreUtilities.java:2368)
    at org.jvnet.substance.SubstancePopupMenuUI.createUI(SubstancePopupMenuUI.java:59)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:75)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:279)
    at javax.swing.UIDefaults.getUI(UIDefaults.java:771)
    at javax.swing.UIManager.getUI(UIManager.java:1013)
    at javax.swing.JPopupMenu.updateUI(JPopupMenu.java:227)
    at javax.swing.JPopupMenu.<init>(JPopupMenu.java:192)
    at javax.swing.JPopupMenu.<init>(JPopupMenu.java:177)
    at javax.swing.JMenu.ensurePopupMenuCreated(JMenu.java:545)
    at javax.swing.JMenu.add(JMenu.java:578)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator$WebBrowserMenuBar.<init>(DefaultWebBrowserDecorator.java:277)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator.<init>(DefaultWebBrowserDecorator.java:565)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.createWebBrowserDecorator(JWebBrowser.java:112)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.<init>(JWebBrowser.java:191)
    at com.lida.util.ReportPreviewUtil.<init>(ReportPreviewUtil.java:45)
    at com.lida.util.ReportPreviewUtil.getInstance(ReportPreviewUtil.java:32)
    at com.lida.main.branch.report.dailyschedule.thread.DailyScheduleReportThread.run(DailyScheduleReportThread.java:10)
    at java.lang.Thread.run(Thread.java:745)
UIDefaults.getUI() failed: createUI() failed for javax.swing.JPopupMenu[,0,0,0x0,invalid,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumSize=,minimumSize=,preferredSize=,desiredLocationX=0,desiredLocationY=0,label=,lightWeightPopupEnabled=true,margin=,paintBorder=true] java.lang.reflect.InvocationTargetException
java.lang.Error
    at javax.swing.UIDefaults.getUIError(UIDefaults.java:732)
    at javax.swing.MultiUIDefaults.getUIError(MultiUIDefaults.java:130)
    at javax.swing.UIDefaults.getUI(UIDefaults.java:777)
    at javax.swing.UIManager.getUI(UIManager.java:1013)
    at javax.swing.JPopupMenu.updateUI(JPopupMenu.java:227)
    at javax.swing.JPopupMenu.<init>(JPopupMenu.java:192)
    at javax.swing.JPopupMenu.<init>(JPopupMenu.java:177)
    at javax.swing.JMenu.ensurePopupMenuCreated(JMenu.java:545)
    at javax.swing.JMenu.add(JMenu.java:578)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator$WebBrowserMenuBar.<init>(DefaultWebBrowserDecorator.java:277)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator.<init>(DefaultWebBrowserDecorator.java:565)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.createWebBrowserDecorator(JWebBrowser.java:112)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.<init>(JWebBrowser.java:191)
    at com.lida.util.ReportPreviewUtil.<init>(ReportPreviewUtil.java:45)
    at com.lida.util.ReportPreviewUtil.getInstance(ReportPreviewUtil.java:32)
    at com.lida.main.branch.report.dailyschedule.thread.DailyScheduleReportThread.run(DailyScheduleReportThread.java:10)
    at java.lang.Thread.run(Thread.java:745)
org.jvnet.substance.api.UiThreadingViolationException: Component creation must be done on Event Dispatch Thread
    at org.jvnet.substance.utils.SubstanceCoreUtilities.testComponentCreationThreadingViolation(SubstanceCoreUtilities.java:2368)
    at org.jvnet.substance.SubstanceCheckBoxMenuItemUI.createUI(SubstanceCheckBoxMenuItemUI.java:82)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:75)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:279)
    at javax.swing.UIDefaults.getUI(UIDefaults.java:771)
    at javax.swing.UIManager.getUI(UIManager.java:1013)
    at javax.swing.JMenuItem.updateUI(JMenuItem.java:249)
    at javax.swing.JMenuItem.init(JMenuItem.java:211)
    at javax.swing.JMenuItem.<init>(JMenuItem.java:150)
    at javax.swing.JCheckBoxMenuItem.<init>(JCheckBoxMenuItem.java:164)
    at javax.swing.JCheckBoxMenuItem.<init>(JCheckBoxMenuItem.java:104)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator$WebBrowserMenuBar.<init>(DefaultWebBrowserDecorator.java:278)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator.<init>(DefaultWebBrowserDecorator.java:565)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.createWebBrowserDecorator(JWebBrowser.java:112)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.<init>(JWebBrowser.java:191)
    at com.lida.util.ReportPreviewUtil.<init>(ReportPreviewUtil.java:45)
    at com.lida.util.ReportPreviewUtil.getInstance(ReportPreviewUtil.java:32)
    at com.lida.main.branch.report.dailyschedule.thread.DailyScheduleReportThread.run(DailyScheduleReportThread.java:10)
    at java.lang.Thread.run(Thread.java:745)
UIDefaults.getUI() failed: createUI() failed for javax.swing.JCheckBoxMenuItem[,0,0,0x0,invalid,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,disabledSelectedIcon=,margin=null,paintBorder=false,paintFocus=false,pressedIcon=,rolloverEnabled=false,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=] java.lang.reflect.InvocationTargetException
java.lang.Error
    at javax.swing.UIDefaults.getUIError(UIDefaults.java:732)
    at javax.swing.MultiUIDefaults.getUIError(MultiUIDefaults.java:130)
    at javax.swing.UIDefaults.getUI(UIDefaults.java:777)
    at javax.swing.UIManager.getUI(UIManager.java:1013)
    at javax.swing.JMenuItem.updateUI(JMenuItem.java:249)
    at javax.swing.JMenuItem.init(JMenuItem.java:211)
    at javax.swing.JMenuItem.<init>(JMenuItem.java:150)
    at javax.swing.JCheckBoxMenuItem.<init>(JCheckBoxMenuItem.java:164)
    at javax.swing.JCheckBoxMenuItem.<init>(JCheckBoxMenuItem.java:104)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator$WebBrowserMenuBar.<init>(DefaultWebBrowserDecorator.java:278)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator.<init>(DefaultWebBrowserDecorator.java:565)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.createWebBrowserDecorator(JWebBrowser.java:112)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.<init>(JWebBrowser.java:191)
    at com.lida.util.ReportPreviewUtil.<init>(ReportPreviewUtil.java:45)
    at com.lida.util.ReportPreviewUtil.getInstance(ReportPreviewUtil.java:32)
    at com.lida.main.branch.report.dailyschedule.thread.DailyScheduleReportThread.run(DailyScheduleReportThread.java:10)
    at java.lang.Thread.run(Thread.java:745)
org.jvnet.substance.api.UiThreadingViolationException: Component creation must be done on Event Dispatch Thread
    at org.jvnet.substance.utils.SubstanceCoreUtilities.testComponentCreationThreadingViolation(SubstanceCoreUtilities.java:2368)
    at org.jvnet.substance.SubstancePopupMenuSeparatorUI.createUI(SubstancePopupMenuSeparatorUI.java:60)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:75)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:279)
    at javax.swing.UIDefaults.getUI(UIDefaults.java:771)
    at javax.swing.UIManager.getUI(UIManager.java:1013)
    at javax.swing.JSeparator.updateUI(JSeparator.java:139)
    at javax.swing.JSeparator.<init>(JSeparator.java:106)
    at javax.swing.JPopupMenu$Separator.<init>(JPopupMenu.java:1526)
    at javax.swing.JPopupMenu.addSeparator(JPopupMenu.java:552)
    at javax.swing.JMenu.addSeparator(JMenu.java:674)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator$WebBrowserMenuBar.<init>(DefaultWebBrowserDecorator.java:287)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator.<init>(DefaultWebBrowserDecorator.java:565)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.createWebBrowserDecorator(JWebBrowser.java:112)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.<init>(JWebBrowser.java:191)
    at com.lida.util.ReportPreviewUtil.<init>(ReportPreviewUtil.java:45)
    at com.lida.util.ReportPreviewUtil.getInstance(ReportPreviewUtil.java:32)
    at com.lida.main.branch.report.dailyschedule.thread.DailyScheduleReportThread.run(DailyScheduleReportThread.java:10)
    at java.lang.Thread.run(Thread.java:745)
UIDefaults.getUI() failed: createUI() failed for javax.swing.JPopupMenu$Separator[,0,0,0x0,invalid,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumSize=,minimumSize=,preferredSize=,orientation=HORIZONTAL] java.lang.reflect.InvocationTargetException
java.lang.Error
    at javax.swing.UIDefaults.getUIError(UIDefaults.java:732)
    at javax.swing.MultiUIDefaults.getUIError(MultiUIDefaults.java:130)
    at javax.swing.UIDefaults.getUI(UIDefaults.java:777)
    at javax.swing.UIManager.getUI(UIManager.java:1013)
    at javax.swing.JSeparator.updateUI(JSeparator.java:139)
    at javax.swing.JSeparator.<init>(JSeparator.java:106)
    at javax.swing.JPopupMenu$Separator.<init>(JPopupMenu.java:1526)
    at javax.swing.JPopupMenu.addSeparator(JPopupMenu.java:552)
    at javax.swing.JMenu.addSeparator(JMenu.java:674)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator$WebBrowserMenuBar.<init>(DefaultWebBrowserDecorator.java:287)
    at chrriis.dj.nativeswing.swtimpl.components.DefaultWebBrowserDecorator.<init>(DefaultWebBrowserDecorator.java:565)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.createWebBrowserDecorator(JWebBrowser.java:112)
    at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.<init>(JWebBrowser.java:191)
    at com.lida.util.ReportPreviewUtil.<init>(ReportPreviewUtil.java:45)
    at com.lida.util.ReportPreviewUtil.getInstance(ReportPreviewUtil.java:32)
    at com.lida.main.branch.report.dailyschedule.thread.DailyScheduleReportThread.run(DailyScheduleReportThread.java:10)
    at java.lang.Thread.run(Thread.java:745)
时间: 2024-09-17 04:07:43

swing- 执行到 NativeInterface.runEventPump 页面卡死的相关文章

servlet重定向失败,如图所示。这句话确实执行到了,但是浏览器页面没有跳转,网址也没有变化

问题描述 servlet重定向失败,如图所示.这句话确实执行到了,但是浏览器页面没有跳转,网址也没有变化 解决方案 正解:ajax发出的请求无法使用重定向 解决方案二: 是不是路径的问题 或者你把中间的函数去掉 直接让那这个方法调转 你看行吗 解决方案三: 是不是路径的问题 或者你把中间的函数去掉 直接让那这个方法调转 你看行吗 解决方案四: 我也是同样的 问题 楼主如果知道了答案了 麻烦告诉我一下

执行到httpclient.execute(post)就不执行了是为什么?

问题描述 执行到httpclient.execute(post)就不执行了是为什么? 解决方案 httpClient访问网络,httpclient.execute(httpGet)方法不执行问题httpclient.execute()不执行也不报错解决办法关于ScheduledExecutorService执行一段时间之后就不执行的问题 解决方案二: 是不是在等服务器响应?

数据库连接断开后,执行到hibernate语句时,程序不往下执行

问题描述 数据库连接断开后,执行到hibernate语句时,程序不往下执行 程序运行时,如果数据库服务没有开,或者数据库服务关闭后,当执行到hibernate查询数据库等操作时,程序就不往下执行,就会一直卡在hibernate这里,有什么办法解决吗?也不报错误,就不走了,可以设置超时时间吗,谢谢大家 解决方案 怎么会一直卡下去呢,如果数据库关闭,hibernate肯定会在一定时间内做出响应的.上代码 解决方案二: 不报错误?应该会错误才对啊!会报连接超时或者数据库拒绝连接! 解决方案三: 应该会

for-输入的n太大,如111111111,但是没有溢出,为什么不能执行到printf(“1”);

问题描述 输入的n太大,如111111111,但是没有溢出,为什么不能执行到printf("1"): void Build(DuLinkList *L,int n)//环的建立 { int i; DuLinkList p,q; *L = (DuLinkList)malloc(sizeof(DuLNode)); (*L)->number = 1; srand((int)time(NULL)); (*L)->key = rand()%10+1; if(n<=0){ pri

activex-JSP调用OCX不自动执行到OnCreate

问题描述 JSP调用OCX不自动执行到OnCreate 请教诸君,是否在OCX开发的是否有遇到如下现象: 用MFC写的OCX控件(ODL)的,在被JSP脚本引用后,点击IE的告警后,OCX不直接进入到OnCreat函数中,而是需要点击一下OCX的引用区域,才会执行过去,里面的方法是可以正常调用的请问有朋友遇到过相似的问题吗?希望给出一些意见,谢谢诸位.

MFC和SNMP++ 执行到“Snmp snmp(status);”时发生死机

问题描述 MFC和SNMP++ 执行到"Snmp snmp(status);"时发生死机 http://bbs.csdn.net/topics/360262858和这个哥们儿的问题一趟,他说把那个调用做成类后解决问题了,但是我不会做呃-- 求大神指导 解决方案 SNMP 介绍

android webview屏蔽alert页面卡死

问题描述 android webview屏蔽alert页面卡死 怎么让这个对话框消失但是页面又不卡死? 解决方案 这个应该是android的默认对话框,关掉就是了,卡死是什么意思 解决方案二: 你alert的是web的界面还是android的对话框??? 解决方案三: 页面写的话,你按下返回键应该就没有了,android的话,那就是你对话框没做事件处理,也不知道你的对话框是怎么写的... 解决方案四: 是不是没有把遮罩层去掉?

dao-debug 每次执行到while 就跳到异常处理

问题描述 debug 每次执行到while 就跳到异常处理 报错提示: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? and t.colpas=?' at line

scp ssh io-SCP执行到100%后卡住,服务端中文件缺少部分

问题描述 SCP执行到100%后卡住,服务端中文件缺少部分 从linux中scp到 cygwn时,时有发生卡在100%的问题 通过查看进程信息,得知client与server端的ssh连接未关闭: 有个方向: 通过查看成功scp文件的strace信息,发现一般read 数据大小为16324.49152,这些都是1024的倍数. 而scp失败的情况下,出现了read 32767(32768=1024*32).同时在网上查到,如果文件里出现''会发生pipe end的情况. 所以猜想文件传输过程中是