Inserting images to mark text boundaries

Ive added text to a JTextPane from a file.
and by mouse click ive inserted character
to mark the boundaries of the text.
instead of character ive to do with images
for marking the segment boundaries.
please suggest me some method for inserting
images in TextPane for marking boundaries

Sorry Andre..Still im not getting what you are saying.. im trying to do like this..Could u pls suggest me where i went wrong..Im inserting the icon directly to textpane..rather than to label nd inserting label to textpane bcos label with image cant be retained when mouse is clicked over several times in textpane....
import java.awt.Cursor;
import java.awt.Image;
import java.awt.Point;
import java.awt.Toolkit;
import java.io.*;
import java.util.Enumeration;
import java.util.Vector;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JInternalFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import ncst.pgdst.*;
import java.awt.Color;
import javax.swing.ImageIcon;
import javax.swing.text.*;
import com.sun.org.apache.xerces.internal.impl.io.UTF8Reader;
import java.util.Collection;
import java.util.Iterator;
import java.util.StringTokenizer;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.geom.Ellipse2D;
import java.awt.geom.Line2D;
import javax.swing.text.DefaultStyledDocument;
public class EditFormGui  extends javax.swing.JFrame{
    private javax.swing.JMenu fileMenu;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JLabel labelModes;
    private javax.swing.JPanel leftPanel;
    private javax.swing.JMenuItem loadRST;
    private javax.swing.JButton paraSegment;
    private javax.swing.JMenuItem quit;
    private javax.swing.JMenuItem save;
    private javax.swing.JButton saveSegmentMode;
    private javax.swing.JButton editSegment;
    private javax.swing.JButton showStructure;
    private javax.swing.JButton showText;
    private javax.swing.JMenu structureMenu;
    private javax.swing.JTextPane textPane;
    private javax.swing.JPanel textPanel;
    private boolean segmentFlag = false,debug=true;
    private UserText userText=new UserText();
    private JPanel structureframe=new JPanel();
    private javax.swing.JTabbedPane jTabbedPane;
    private java.util.Vector pNodesVector = new java.util.Vector();
    private javax.swing.JComboBox relationList;
    private javax.swing.JFrame relationChooserFrame = new javax.swing.JFrame();
    private javax.swing.JScrollPane relationScrollPane = new javax.swing.JScrollPane();
    private JLabel label_image;
    ImageIcon icon;
    Cursor c;
    String[] store;
    int posX_icon,posY_icon;
    Point iconPos;
    Vector iconPositions;
    public EditFormGui() {
        initComponents();
    public void initComponents()
        jTabbedPane = new javax.swing.JTabbedPane();
        textPanel = new javax.swing.JPanel();
        iconPositions=new Vector();
        saveSegmentMode = new javax.swing.JButton();
        editSegment=new javax.swing.JButton();
        showText = new javax.swing.JButton();
        showStructure = new javax.swing.JButton();
        labelModes = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jScrollPane1.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
        textPane = new javax.swing.JTextPane();
        textPane.setEditable(false);
         icon = new ImageIcon("F:/images/division.jpg");
         label_image = new JLabel(icon);
        jMenuBar1 = new javax.swing.JMenuBar();
        fileMenu = new javax.swing.JMenu();
        loadRST = new javax.swing.JMenuItem();
        save = new javax.swing.JMenuItem();
        quit = new javax.swing.JMenuItem();
        structureMenu = new javax.swing.JMenu();
      Toolkit tk = Toolkit.getDefaultToolkit();
      Image image =tk.getImage("F:/images/del.jpg");
      c= tk.createCustomCursor(image , new Point(0,0), "F:/images/del.jpg");
        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        saveSegmentMode.setText("Save Segment");
        saveSegmentMode.addActionListener(new java.awt.event.ActionListener() {
         public void actionPerformed(java.awt.event.ActionEvent evt) {
           saveSegmentModeActionPerformed(evt);
        org.jdesktop.layout.GroupLayout textPanelLayout = new org.jdesktop.layout.GroupLayout(textPanel);
        textPanel.setLayout(textPanelLayout);
        textPanelLayout.setHorizontalGroup(
            textPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(textPanelLayout.createSequentialGroup()
              .addContainerGap()
                .add(textPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 337, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                            .add(51,51,51)
                            .add(saveSegmentMode)
                            .addContainerGap(36, Short.MAX_VALUE)                               
       textPanelLayout.setVerticalGroup(
            textPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(textPanelLayout.createSequentialGroup()           
            .add(textPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(textPanelLayout.createSequentialGroup()
                        .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 211, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(49, 49, 49)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED))
                    .add(textPanelLayout.createSequentialGroup()
                        .addContainerGap(43, Short.MAX_VALUE)
                        .add(saveSegmentMode)))
                .addContainerGap(43, Short.MAX_VALUE))        
        showText.setText("Text");
        labelModes.setText("Modes: ");
        showStructure.setText("Structure");
        jTabbedPane.add(textPanel);
        jTabbedPane.setTitleAt(0,"Text");
        showStructure.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                showStructureActionPerformed(evt);
        textPane.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                textPaneKeyTyped(evt);
        textPane.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                textPaneMouseClicked(evt);
               public void mouseEntered(java.awt.event.MouseEvent evt) {
                textPaneMouseEntered(evt);
                public void mouseExited(java.awt.event.MouseEvent evt) {
                textPaneMouseExited(evt); 
        jScrollPane1.setViewportView(textPane);
        fileMenu.setText("File");
        loadRST.setText("Load RST file");
        loadRST.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                loadRSTActionPerformed(evt);
        fileMenu.add(loadRST);
        save.setText("Save RST");
        save.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                saveActionPerformed(evt);
        fileMenu.add(save);
        quit.setText("Quit");
        quit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                quitActionPerformed(evt);
        fileMenu.add(quit);
        jMenuBar1.add(fileMenu);
        structureMenu.setText("Structure");
        jMenuBar1.add(structureMenu);
        setJMenuBar(jMenuBar1);
        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
                getContentPane().setLayout(layout);
                layout.setHorizontalGroup(
                    layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(layout.createSequentialGroup()
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(layout.createSequentialGroup()
                                .add(26, 26, 26)
                            .add(layout.createSequentialGroup()
                                .addContainerGap()
                                .add(jTabbedPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                        .addContainerGap())
                layout.setVerticalGroup(
                    layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(layout.createSequentialGroup()
                        .addContainerGap()
                        .add(23, 23, 23)
                        .add(jTabbedPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        textPane.setText("This seems to be an interesting exercise. I will surely learn swing now.");
        userText = new UserText(textPane.getText());
        pack();
        validate();
    private void saveSegmentModeActionPerformed(java.awt.event.ActionEvent evt) {                                               
        String textWithPipes= new String(textPane.getText());
        System.out.println("Text with pipes"+textWithPipes);
        userText.setUserText(textWithPipes);
        showStructure();
    private void showStructureActionPerformed(java.awt.event.ActionEvent evt) {
        showStructure();
    public void showStructure()
             int count=0;
           int totcount=iconPositions.size();
           java.util.Iterator iter = iconPositions.iterator();
          store=new String[totcount];
          try
           String usertxt=userText.getTextWithSegment();
                  char[] usrtxt_chararr=usertxt.toCharArray();
                  System.out.println("Character array Usertextlength"+usrtxt_chararr.length);
                  int pt;
                  pt=0;
          while (iter.hasNext()) {
                      String obj=iter.next().toString();
                      int itervar=Integer.parseInt(obj);
          String subst=usertxt.substring(pt,itervar);   
          pt=itervar+1;
            store[count]=subst;
             count++;
           catch(Exception e) {}
               for(int i=0;i<store.length;i++)
                    System.out.println("Store Array Elements"+store);
structureframe=new Rstmain.gui.ModifyS(store);
structureframe.setVisible(true);
jTabbedPane.add(structureframe); //Adding Structure frame
jTabbedPane.setTitleAt(1,"Structure");
validate();
private void textPaneKeyTyped(java.awt.event.KeyEvent evt) {                                 
if (segmentFlag){
textPane.setEditable(false);
private void textPaneMouseClicked(java.awt.event.MouseEvent evt) {                                     
textPane.setEditable(true);
int caretpos=textPane.getCaretPosition();
System.out.println("Caret inserting positions"+caretpos);
iconPositions.add(caretpos);
// textPane.insertComponent(label_image);
textPane.insertIcon(icon);
textPane.setEditable(false);
private void textPaneMouseEntered(java.awt.event.MouseEvent evt) {                                     
private void textPaneMouseExited(java.awt.event.MouseEvent evt) {                                     
setCursor(null);
private void loadRSTActionPerformed(java.awt.event.ActionEvent evt) {                                       
File file;
SimpleInput sin;
javax.swing.JFileChooser fd;
fd = new javax.swing.JFileChooser(new File("."));
fd.setDialogTitle("Open File...");
int action = fd.showOpenDialog(this);
if (action != javax.swing.JFileChooser.APPROVE_OPTION) {
return;
file = fd.getSelectedFile();
try {
sin = new SimpleInput(file);
StringBuffer line = new StringBuffer("");
textPane.setText("");
while (!sin.eof()) {
line.append(sin.readLine());
textPane.setText(line.toString());
textPane.setEditable(false);
userText = new UserText(line.toString());
catch (Exception e) {
javax.swing.JOptionPane.showMessageDialog(this,
"Sorry, some error occurred:\n" + e.getMessage());
private void saveActionPerformed(java.awt.event.ActionEvent evt) {                                    
File file;
javax.swing.JFileChooser userFile;
userFile = new javax.swing.JFileChooser(".");
userFile.setDialogTitle("Save Text As...");
int action = userFile.showSaveDialog(this);
if (action != javax.swing.JFileChooser.APPROVE_OPTION) {
return;
file = userFile.getSelectedFile();
if (file.exists()) {
action = javax.swing.JOptionPane.showConfirmDialog(this,
"Replace existing file?");
if (action != javax.swing.JOptionPane.YES_OPTION)
return;
try {
PrintWriter out = new PrintWriter(new FileWriter(file));
String contents = textPane.getText();
out.print(contents);
if (out.checkError())
throw new java.io.IOException("Error while writing to file.");
out.close();
catch (java.io.IOException e) {
javax.swing.JOptionPane.showMessageDialog(this,
"Sorry, an error has occurred:\n" + e.getMessage());
private void quitActionPerformed(java.awt.event.ActionEvent evt) {                                    
System.exit(0);
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
System.out.println("Inside run");
new EditFormGui().setVisible(true);
And this is the UserText classimport com.sun.org.apache.bcel.internal.classfile.JavaClass;
public class UserText{
int countpipe;
String userText="";
java.util.Vector segmentinfo = new java.util.Vector();
public UserText(String input) {
userText = input;
public UserText(){}
public int getNumberOfSegments()
return segmentinfo.size();
public void addSegment(int endIndex){
int i = 0;
segmentinfo.add(endIndex);
public void setUserText(String textWithPipes)
int indexOfPiping, j=0 ;
StringBuffer temp = new StringBuffer(textWithPipes);
segmentinfo.add(j);
for (int i = 0; i < textWithPipes.length();i++)
j = textWithPipes.indexOf('|',j);
segmentinfo.add(j);
for (int k = 0; k < textWithPipes.length();k++)
if(textWithPipes.charAt(k)=='|')
countpipe++;
userText = temp.toString();
public String getTextWithSegment(){
return userText;
public String getTextWithoutSegment(){
java.util.StringTokenizer st = new java.util.StringTokenizer(userText,"|");
StringBuffer temp = new StringBuffer();
while(st.hasMoreTokens())
temp.append(st.nextToken());
return temp.toString();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  

Similar Messages

  • Correct workflow when inserting images into text, InDesign CS4

    Hi,
    I am new to InDesign and I have a problem regarding a really basic thing and I would be very grateful for help.
    I am writing an article which is about 10 pages long. It consists mostly of text. I have finished writing and now I want to add some illustrations with descriptions. I've already figured out it's best to insert images into the text frame so they behave as "anchored objects" and they move together with text when I add or delete something on previous pages. Now I would like to place TWO OR MORE images, one next to each other, in a line. This is a bit tricky but I created an object style with Position: Custom in "Anchored object options" and it works more or less fine. This works great but now it would be hard to add descriptions to these images that would still be anchored.
    So I created something different. I made an empty rectangle frame, a small text frame under it and grouped them. Then I placed it in my master text frame and basically did the same thing as for previously described images. Now I place the newly loaded image in the empty rectangular frame and add text in the empty text frame. BUT now I have problems with frame size for different-size images.
    What if I have a REALLY LONG article and want to add LOTS of images with decriptions that would be anchored in the text so I can edit previous pages? I can do this my way, but it's extremely uncomfortable and takes ages. Is there any comfortable, non-destructive workflow for doing such things?
    Sorry for my English.

    Hi,
    I would recommend following steps:
    Place one or more images
    Don't anchor them yet.
    Arange them (the images) relatively to each other, add a text frame and arrange them correct relatively to the images.
    Group images and text
    Copy (or cut) them into the clippboard
    Set the curser into the text where it should flow
    Paste it
    Adjust the anchored object (the group)
    You need to group several objects to anchor them together as one anchor.
    Further recommendation:
    For the images I would specify an object style for fitting, stroke, corner optione.
    For text frames I would specify an object style for text object options, like text offset, and used paragraph style, no boarder, etc.
    For the group I would spcify an object style which leaves above mentioned settings undefined (option field is grea or has a dash). But the anchored position of the whole group and text wrapping should be specified.
    Willi Adelberger

  • Unable to insert image in editor

    When I try to insert images in the text editor, by clicking the "insert image icon", a black box appears with the "insert image" message in the top left corner of the box and the close button (X) in the top right hand corner. However, the "insert video" option works OK. Can anyone help me to resolve this problem?

    I am referring to the editor used for posting questions etc in Adobe Forums. That is, the editor I am now using to post this reply to you. I have explained as clrearly as I can what happens when I click the icon, which allows for the insertion of images. I hope I have provided a better understanding.

  • Inserting images in forum message?

    Hi,
    Is it possible to insert attached images inline in the forum messages (similar to what you can do in the wiki pages)
    We in our organization are using forum which comes with portal.
    Regards,
    Amit

    Hi Amit,
    its not possible to insert images in forum text, but you can attach images,docs to the forum message. To change attached files size,number of attachments and type you should have forum administrator role.
    Forums come with portal are jive forums , you can check administration guides on jive forums in Google.
    Regards,
    Mahesh.

  • Inserting image in richtexteditor and text

    HI all,
       I am new to Flex 3. I was creating AIR application. I want to insert image in to richtexteditor and text control. I tried adding <img> tag to html source and added htmlText to richtexteditor and text control, but its not considering img tag.
       So is there way I can include image(animated GIF) in to richtexteditor and text control?
    Thanks,
    John

    create a default base block on the table with the BLOB.
    Change the BLOB item to an image item.
    Use the read_image_file built in to load images to the image item. (see online help).
    That should do it.

  • How can i edit a clip or share it. I cant change the sencond the clips lasts or insert an image or a text! whats going on???

    how can i edit a clip or share it. I cant change the sencond the clips lasts or insert an image or a text! whats going on???

    you have watched and understood the tutorials?
    http://help.apple.com/imovie/

  • Inserting images + text

    I am using varchar for inserting text but am not satisfy because sometime the length of data exceeds 3900kb and it throws exception. further more I want to insert images with text also
    thanks & best regards

    Hi, you can use BLOB data type for storage the
    images and CLOB data type for storage the text, this
    allow storage until 4 GB.
    Regards.thanks for your prompt reply
    Can you please let me know any example
    thanks & best regards

  • Inserting images in text

    Do you know how to insert photos in a text?
    The photos do not go where I have placed the cursor in the text, but a few lines away.
    Also, how do I "watermark" a page? I can get to the point where I should click on "opacity," but I can't find opacity.

    I don't know anything about PS Elements - strictly Photoshop here so I don't know where the commands would be for layers/opacity.
    You may want to pop over to the Adobe PS Elements community and see if you can get your query answered -> http://forums.adobe.com/community/photoshop_elements.
    Best of luck,
    Clinton

  • Adobe premiere elements 12 - how to create menu bar action for my inserted image button

    adobe premiere elements 12 - how to create menu bar action for my inserted image button without using their movie menu theme

    forbemag
    I do not think that I am completely focused into this completely, so let us see if the following is going to help.
    You are going to need a base for your button. When you mention "image" button, I am assuming that you are using that term to differentiate between a text button and a thumbnail type button.
    The menus (main and scene) take their origin in .psd files on the hard drive and strict nomenclature and structure for Layers Palatte. And, the buttons on the menus trace back to the menu markers on the Timeline, main menu marker and order of placement of scene markers. The scene thumbnail will only appear when there is a scene marker on the Timeline to which it.
    In view of all that
    Where have you already inserted this "image (button)"...into the Layers Palette of a Photoshop document or other? Is this "image (button)" in a structured Layer Group in the Layers Palette with sublayer groups, text layers, graphic/background layer"?
    Let me give you an example
    If you have a button (with thumbnail) on the main menu and you want that to open to a specific scene in your movie, then you use a main menu marker on the Timeline at the spot that you want that button to target.
    If I am getting closer to what you seek, then please further clarify the DVD navigational envisioned scheme.
    Thanks.
    ATR
    Add On...I did not see the exchanges between us and SG until after I had posted mine. I thought that your discussions were concluded. Please excuse the interruption.

  • Removing image overlapping over text boxes in InDesign?

    I am importing an image without a background and when it prints, you can see where the image has been placed over the text box. How can I prevent this to allow it to look natural?
    I am submitting a quote in a grey box. When I insert the speech mark image, the PDF looks ok but when I print the addition on top has appeared.

    I am importing an image without a background and when it prints, you can see where the image has been placed over the text box. How can I prevent this to allow it to look natural?
    I am submitting a quote in a grey box. When I insert the speech mark image, the PDF looks ok but when I print the addition on top has appeared.

  • SCN document: 'Insert Image' greyed out at a certain stage/size

    I noticed  a similar issue likeTammy has reported in discussion/thread .Cannot insert or upload an image
    After having inserted text and several images to a draft document, the 'Insert Image' icon became greyed out at a certain stage/size.
    I did some tests following document Solution for Error: Cannot Insert Images on SCN Content, but the the behavior remained the same. Only after having deleted the last inserted image in the document > Save Draft > Edit again the 'Insert Image' icon was not greyed out anymore which is argueing for a size restriction.
    The same html coding as in the document put into a blog does not grey out the ‘Insert Image’ icon. But I found out that after clicking on the ‘Insert Image’ icon > ‘From your Computer’  tab ‘Browse’ is greyed out. Strange and argueing against a size limit is, when I choose ‘Uploaded Images’ I can select images and still  insert them into the blog.
    Does someone have similar experiences / can assist.
    Thank you, Barbara

    We have a recent discussion in SCN support.
    He has same problem. Have a look into the discussion Issue with 'Insert Image' button while creating document in SCN
    I suggest to split you document into two part as part 1 and part 2.

  • Is it possible to insert images in Adobe 9 Standard?

    It appears that it is not possible to insert images in Adobe 9 Standard.  There is no TouchUp Object Tool in the Advanced Editing Toolbar in the standard version.  Only a TouchUp Text Tool.  Is this not a basic function being able to add or change an image in a document?  The tutorials all show this as a capability but they are also demonstrating in the Pro version of Acrobat.  Is there a work around or have I been suckered into buying a product that doesn't quite meet my needs? 

    The Touch-Up Object tool is not available in Standard.
    Adobe Acrobat is not meant to be a word processing program; it is meant to be a cross-platform method for document exchange. Changes are best made in the source program. While the answer to your question would not have been obvious from this list, it is a good reference for the difference between Acrobat products: http://www.adobe.com/products/acrobat/matrix.html .
    If for some reason it is not possible to edit the source file and create the pdf again, you can insert your image as a form button and then flatten it. A lot more work, but post if you want help with this.
    --For other folks reading this thread, Adobe offers trials of its programs. Consider testing before buying.

  • Inserting images in dreamweaver

    HELP! :)
    when I insert images on my page, large grey box with a grey X
    appears...does anyone know how to fix this?

    Josie is right - sounds like you are not working in a defined
    site within Dreamweaver.
    The cross mark means the image is not linked correctly.
    If you are working in a defined site, then maybe post a link
    to the problem page or post the code to
    the probelm area.
    Nadia
    Adobe® Community Expert : Dreamweaver
    Unique CSS Templates |Tutorials |SEO Articles
    http://www.DreamweaverResources.com
    CSS Tutorials for Dreamweaver |
    http://www.adobe.com/devnet/dreamweaver/css.html
    Book: Ultimate CSS Reference (aff link) |
    http://www.sitepoint.com/launch/005dfd4/3/133
    "jimmykamal" <[email protected]> wrote in
    message
    news:gpou26$pva$[email protected]..
    > HELP! :)
    > when I insert images on my page, large grey box with a
    grey X appears...does anyone know how to
    > fix this?

  • Inserting image in rtf doc

    Hi all,
    i am trying to make my own rtf editor , I've read the most of the toppics in this forum on this issue,
    but I'm stucked on inserting the hex Data into the document.
    Do I actually need to override ImageView?
    I found a method in RTFReader (instantiated from read(InputStream in,...)) handleBinaryBlob(byte[] data).
    RTFReader is private, so I cannot override this method. Should I override the read method in
    RTFEditorKit and then call the read method in DefaultEditorKit, or I could just use the doc.insertString(...) with the binary data inside of the overriden RTFEditorKit read method? I will lose the functionallity of the RTFParser this way.
    I know I should override read and write methods but how?
    So could somebody help me on this?
    The code for creating the binary data from buffered image and creating the Icon from StanislavL follows:
    ImageIcon icon=(ImageIcon)StyleConstants.getIcon(attr);
    if (icon!=null) {
    int w=StyleConstants.getIcon(attr).getIconWidth();
    int h=StyleConstants.getIcon(attr).getIconHeight();
    ByteArrayOutputStream os=new ByteArrayOutputStream();
    PNGCodec p=new PNGCodec();
    ImageEncoder pe=p.createImageEncoder("PNG",os,null);
    BufferedImage bi=new BufferedImage(w,h,BufferedImage.TYPE_INT_RGB);
    bi.getGraphics().drawImage(icon.getImage(),0,0,null);
    pe.encode(bi);
    byte[] ba=os.toByteArray();
    int len=ba.length,i;
    StringBuffer sb=new StringBuffer(len*2);
    for (i=0;i<len;i++) {
    String sByte=Integer.toHexString((int)ba & 0xFF);
    if (sByte.length()<2)
    sb.append('0'+sByte);
    else
    sb.append(sByte);
    String s=sb.toString();
    out.write("{\\pict\\pngblip ");
    out.write(s);
    out.write("}");
    extracting image
    String content; //<- image representation
    int len=content.length();
    //converts to binary representation
    byte[] buf=new byte[len/2];
    for (int j=0; j<len/2 ;j++) {
    String c1=content.substring(j*2,j*2+1);
    String c2=content.substring(j*2+1,j*2+2);
    byte b1=Byte.parseByte(c1,16);
    byte b2=Byte.parseByte(c2,16);
    buf[j]=(byte)(b1*16+b2);
    //creates image from binary
    Image img = Toolkit.getDefaultToolkit().createImage(buf);
    ImageIcon icon=new ImageIcon();
    icon.setImage(img);
    if ((icon.getIconHeight()<0) || (icon.getIconWidth()<0))
    return;
    MutableAttributeSet attr=new SimpleAttributeSet();
    StyleConstants.setIcon(attr,icon);
    //inserts image in the document
    document.insertString(currentOffset," ",attr);
    currentOffset++;
    I guess these two functions must be implied into the overriden EditKit write and read methods.
    Could somebody give me a start idea?
    regards
    rumpi

    Thanks for reply.
    It did't helped me a lot or I'dont really understand your idea.
    What you say in your postings is build my own reader and writer.
    For example to open a rtf file in my jeditorpane I must read from
    the input stream each byte and reimplementing AbstractFilter, RTFParser and RTFReader
    I could get all headers like \par or \pic and then rtfDoc.insertString(pos, "the label content", attr) with the attributes extracted from header.
    When that is the only way I am asking myself what are the swing people for?!?!
    I'll try to do that myself, so I'm not asking for code but I would appreciate
    some detailed info about it. For example when I dont use RTFReader anymore
    I loose everything what I've got untill now. So I should read every byte opening a file
    and check like in RTFParser if the first character is "\", then the next couple of bytes
    untill I get the header. Then I should check which labels(text) is this header for(until the next header), so
    I could insert a string with the according attribute set? For Icon when I get the
    \pic header I read the byte sequence and build the picture just like you wrote.
    My Editor is an applet so I've hoped I wouldn't send too much code to the client
    so reimplementing RTFParser, Reader... would slow it down, but whatever.
    Thats really a lot of work only because the given classes are not extendable, grrrr.
    Viravan, thanks for the fast reply , but like I said , I 've already read all relevant
    postings in this forum and didnt found something really helpful. I already read all
    tutorials and articles from sun about this issue and I still have the feeling I'm a freshman
    in this area.
    I'm still angry with the swing team about it, this bug is noted since 2001 I think. grrr
    regards
    rumpi

  • How to restore image after Set Text of Container behavior

    Hi there, I'm not sure how to apply the Set Text of Container behavior. Basically, when I mouse over an image, I want a larger version of the image with decription text to appear.  I also want to restore the original image without text on mouse out.
    I want the larger image and its text to appear in the exact location of the original image not anywhere else on the page. Here's an example what I've done to try and achieve the effect:-
    1. Create a div and insert image in it.
    2. Select the image and Set Text of Container behavior. Under the Set Text of Container dialog box, select the div that the image is in (e.g. div "apdiv1") and type in the New HTML - For example: <img src="largerimage.jpg"><span id="apdiv1">image description</span>
    3. Set the event to mouseover
    I do not know how to proceed to restore the original image without text when I mouse out. I know I’m doing something wrong to achieve this effect but I can’t figure out what it is. Your help is greatly appreciated!

    Use CSS Disjointed Rollovers.
    http://alt-web.com/DEMOS/CSS-Disjointed-Image-Rollover.shtml
    http://alt-web.com/DEMOS/CSS-Disjointed-Rollover-1.shtml
    http://alt-web.com/DEMOS/CSS-Disjointed-Rollover-2.shtml
    http://alt-web.com/DEMOS/CSS-Disjointed-Rollover-3.shtml
    Nancy O.
    THANK YOU NANCY It worked perfectly!
    THANKS GRAMPS!

Maybe you are looking for

  • Thinkpad T400 with Vista OS won't start up

    Hello all, I'm a relatively non-proficient computer user with a T400 that is having some issues with starting up all the way.  For some background, this is a pretty old computer obviously, and has had its share of trouble already.  It has had one bat

  • Blank help pages

    since downloading free apple software updates, I keep getting blank pages for all my help viewers. This happens whether I am connected to the internet or not.The only other thing I have done is install i life '06 from the CD that came with my new Mac

  • Table where XML Messages are stored..?

    Dear SDNers, I am trying to built an custom error monitor. I require access to the XML payload and parse it to retrieve data from it. I need to know where the input XML messages and the XML with Error informations are stored in the database table. I

  • Roundjo

    Every time I try to convert a simple document from word to pdf I receive the message 'conversion failure' with no explanation

  • Simple FM as WS

    Hi Experts, how can I call a webservice (created From SAP Function Module ) with abap  ? Can please someone explain it ? Please dont send me no links !  I have received regarding to my privous psotings tons of hyperlinks . I want to understand it rea