hai everyone.. i need back up those who can help me i will appreciated.... i have problem with inserting image in document.. i has developed word processor in jawi.. i can insert image inside the document but cannot save. after i save the visualise than change state back that enter,the image will disappear automtically.. also i move able to size the visualise desire in open office.. gratify help.. public void actionPerformed(ActionEvent e) {fc = new JFileChooser(); fc addChoosableFileFilter(m_gifFilter); fc addChoosableFileFilter(m_jpgFilter); fc setComponentOrientation(java awt. ComponentOrientation. RIGHT_TO_LEFT); fc setDialogTitle("\u0645\u0627\u0633\u0648\u0642\u06A9\u0646\u0020\u0627\u064A\u0645\u064A\u062C");
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 paint(); 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,"\u06A9\u06AC\u0627\u06AC"); fChoosen getPath() error ,JOptionPane. WARNING_MESSAGE); go; } MutableAttributeSet attr = new SimpleAttributeSet(); StyleConstants setIcon(attr icon); int p = tpOpenJawi getCaretPosition(); try { m_doc insertString(p. " " attr); } catch (BadLocationException ex) {}
fc addChoosableFileFilter(m_rtfFilter); fc setFileFilter(m_rtfFilter); fc removeChoosableFileFilter(m_gifFilter); fc removeChoosableFileFilter(m_jpgFilter); } }; runner start(); }
OJToolbar add(jbInsertImage); jbRTL setIcon(new javax swing. ImageIcon(getClass() getResource("/image/rtl png"))); jbRTL setBorder(new javax displace border. EmptyBorder(new java awt. Insets(1. 1. 1. 1))); jbRTL setMaximumSize(new java awt. Dimension(31. 31)); jbRTL setMinimumSize(new java awt. Dimension(31. 31)); jbRTL setPreferredSize(new java awt. mark(31. 31)); jbRTL addActionListener(new java awt event. ActionListener() { public cancel actionPerformed(java awt event. ActionEvent evt) { jbRTLActionPerformed(evt); }
Forex Groups - Tips on Trading
Related article:
http://forum.java.sun.com/thread.jspa?threadID=5237614
comments | Add comment | Report as Spam
|