//两个字符表示一个字节,所以字节数组长度是字符串长度除以2
byte[] arrOut = new byte[iLen / 2];
for (int i = 0; i < iLen; i = i + 2)
{
String strTmp = new String(arrB, i, 2);
arrOut[i / 2] = (byte) Integer.parseInt(strTmp, 16);
}
return arrOut;
}
imgpanel = new ImagePanel();
imgpanel.addMouseMotionListener(imgpanel);
capture = new JButton("拍照");
capture.addActionListener(this);
save = new JButton("上传该附件");
save.addActionListener(this);
open = new JButton("打开拍照");
open.addActionListener(this);
close = new JButton("关闭拍照");
close.addActionListener(this);
//num = new JTextField();