1 //等待窗口 2 try { 3 LongTimeDialog dialog = UITools.getDialog(this); 4 dialog.setTitle("提示");// 提示框标题 5 if (dialog == null) 6 return; 7 dialog.setLongTimeTask(new ILongTimeTask() { 8 public Object exec() throws Exception { 9 // 加入要等待的代码块 10 try { 11 12 13 14 } catch (Exception e2) { 15 System.out.println("-----------e2:" + e2); 16 SysUtil.abort(); 17 } 18 19 return ""; 20 } 21 22 public void afterExec(Object result) throws Exception { 23 24 } 25 }); 26 Component[] cps = dialog.getContentPane().getComponents(); 27 for (Component cp : cps) { 28 if (cp instanceof JLabel) { 29 // 提示内容 30 ((JLabel) cp).setText("请等待,正在调用OA接口传送数据......"); 31 } 32 } 33 dialog.show(); 34 } catch (Exception e1) { 35 e1.printStackTrace(); 36 SysUtil.abort(); 37 }