this is menu for insert image in the document i create it....the problem with this menu is i can insert image inside the document but cannot save the image went i save the document. the image disappear by it self. the image also cannot resize using mouse pointer like in open office or micorosft word..any want able to make this code work????????plz..



Java Code:
ItemInsertImage.setText(imagemenu);
       ItemInsertImage.setToolTipText("Masukkan Imej");
       ItemInsertImage.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/thumbnail_tiny.png")));
       ItemInsertImage.setComponentOrientation(java.awt.ComponentOrientation.RIGHT_TO_LEFT);
       ItemInsertImage.addActionListener(new java.awt.event.ActionListener() {

      public void actionPerformed(ActionEvent e) {
		fc = new JFileChooser();
      	fc.addChoosableFileFilter(m_gifFilter);
      	fc.addChoosableFileFilter(m_jpgFilter);
      	fc.setDialogTitle("\u0645\u0627\u0633\u0648\u0642\u06A9\u0646\u0020\u0627\u064A\u0645\u064A\u062C");
      	fc.setComponentOrientation(java.awt.ComponentOrientation.RIGHT_TO_LEFT);
	   	fc.setFileFilter(m_gifFilter);
      	fc.removeChoosableFileFilter(m_rtfFilter);
	    Thread runner = new Thread() {
	    public void run() {
	    if (fc.showOpenDialog(OJMain.this) != JFileChooser.APPROVE_OPTION)
	    return;
	    OJMain.this.repaint();
        File fChoosen = fc.getSelectedFile();
        ImageIcon icon = new ImageIcon(fChoosen.getPath());
        int w = icon.getIconWidth();
        int h = icon.getIconHeight();
        if (w<=0 || h<=0) {
        JOptionPane.showMessageDialog(OJMain.this,"\u0645\u0639\u0627\u0641,\u0020\u0641\u0627\u0674\u064A\u0644\u0020\u06AC\u0627\u0645\u0628\u0631\u0020\u06AC\u0627\u06AC\u0644\u0020\u062F\u0628\u0627\u0686.\n"+fChoosen.getPath(), error , JOptionPane.WARNING_MESSAGE);
        return;
        }

        MutableAttributeSet attr = new SimpleAttributeSet();
        StyleConstants.setIcon(attr, icon);
        int p = tpOpenJawi.getCaretPosition();
        try {
          m_doc.insertString(p, " ", attr);
        }
        catch (BadLocationException ex) {}

        // Its ok to do this outside of the event-dispatching
        // thread because the chooser is not visible here.
        fc.addChoosableFileFilter(m_rtfFilter);
        fc.setFileFilter(m_rtfFilter);
        fc.removeChoosableFileFilter(m_gifFilter);
        fc.removeChoosableFileFilter(m_jpgFilter);
        }
      };
        runner.start();
      }
    });

        MenuTools.add(ItemInsertImage);