void open(File file){
		openfile = file;
		
				try {
					FileInputStream in = new FileInputStream(openfile);
					ObjectInputStream input = new ObjectInputStream(in);
					HTMLDocument doc=(HTMLDocument) input.readObject();
					doc.addUndoableEditListener(new UndoableEditListener() {
					
					@Override
					public void undoableEditHappened(UndoableEditEvent e) {
						// TODO Auto-generated method stub
						frame.getUndoManager().addEdit(e.getEdit());
					}
				});// 添加可撤销、恢复编辑监听
					frame.getDocList().set(frame.getSelectTabIndex(),doc);
					frame.getJJTextPane().setDocument(frame.getMyDocument());
//					frame.htmldoc=doc;
//					frame.textPane.setDocument(frame.htmldoc);
					input.close();
					in.close();
				}catch( StreamCorruptedException e){
					e.printStackTrace();
					JOptionPane.showMessageDialog(frame, "错误,不支持的文件格式,请重新打开支持的文件", "错误", JOptionPane.ERROR_MESSAGE);
					return;
				}catch(java.io.EOFException  e){
					e.printStackTrace();
					JOptionPane.showMessageDialog(frame, "错误,不支持的文件格式,请重新打开支持的文件", "错误", JOptionPane.ERROR_MESSAGE);
					return;
				} catch (ClassNotFoundException e1) {
					// TODO Auto-generated catch block
					e1.printStackTrace();

				} catch (FileNotFoundException e1) {
					// TODO Auto-generated catch block
					e1.printStackTrace();
				} catch (IOException e2) {
					e2.printStackTrace();

				} 
	}