Put text beside a gif in JTextPane?

I can put a .gif in JtextPane like this:
final StyledDocument doc=(StyledDocument )felt.getDocument();
final MutableAttributeSet attr=new SimpleAttributeSet();
try{
StyleConstants.setIcon(attr, new ImageIcon(this.getClass().getResource("chatlogo.gif")));
doc.insertString(doc.getLength(),"\n\n",attr);
}catch(BadLocationException b){System.out.println(b);}
But somehow am not able to put a text beside it or under it? Can someone help me with this?

Excuse me...
Try that after inserting image, and if you still have errors tell me these.
javax.swing.text.MutableAttributeSet attr = new javax.swing.text.SimpleAttributeSet();
attr.addAttribute(StyleConstants.Alignment, StyleConstants.ALIGN_CENTER);
int offset = doc.getLentgh() - 1;
int size = 1;
doc.setParagraphAttributes(offset, size, attr, false);

Similar Messages

  • How to put Nested List in HTMLDocument  in JTextPane(JEditorPane)

    How to put Nested List in HTMLDocument in JTextPane(JEditorPane). I was trying to put nested Bullets and Numbering but found that not enough support is provided for it. The HTMLEditorKit behaves abnormally.
    There are two ways to do that:
    1) just extract the whole text by getText, but the problem is you don't have the postion where the cursor was when the event was triggered so u can't add ur text to it , even if u extracted the text at cursor there can be multiple copies, so no way...also if u change it and reinsert the whole text the atributeset for whole text is lost.
    2) So the only way is work with jugglery of Elements, which is full of bugs. I find it very difficult to move backward in it and insert a tag around a tag. Such a simple thing and almost no way. If anybody has any ideas please mail me.
    Thanx in Advance

    Settings > Mail, Contacts, Calendars > Contacts > Sort Order/Display Order 'First, Last'

  • How do I put text into an Edge File that clients can edit easily afterwards

    Hi
    Can anyone explain how I can put text into an edge file (styled with google fonts) and make it so that clients can access the text and update the text as they require?
    Previous suggestion was dynamically loading a .txt file - any instructions would be most appreciated.
    Thanks.

    Hi Resdesign!
    Your code is very useful to learn how to use Json in Adobe Edge Animate!
    But I have a question: why you use ( i ) as argument of the function UpdateInfo and when you recall it you use ( index )?
    $.getJSON('slides.json', function(data){
              //for(var i=0; i<data.length; i++){
    function updateInfo(i){
                        sym.$("photo").css({"background-image": "url('"+data[i].image+"')"});
                        sym.$("pillar").html(data[i].pillar);
                        sym.$("what").html(data[i].what);
                        // position
              index = -1;
              sym.$("btn").click(function(){
              index++;
                        if (index>=5){
                                  index = 0;
              updateInfo(index);
    Many thanks for your attention!
    Davide

  • Putting Text over a video is not working

    O.K.  I follow the instructions on putting text over a video (for iMovie 11), but every time I do this all I see is a black screen with the text in it.  I can't get the video to show up when I preview/play the video.  I have the same problem when trying to use the green screen feature as well.  Is there a setting or something that I need to change in iMovie?  If so what/where is it, because I am at my "witts end" trying to find it?

    I would suggest trashing the iMovie Preferences file. Instructions are here. (You should not need to trash the iApps preferences, just the iMovie one.)
    https://discussions.apple.com/docs/DOC-4061

  • How do i put text in the picture

    how do i put text in the picture ?

    In addition to the apps already mentioned here are some that can add text to a photo:
    Some Image Editors That Support layers:
    Photoshop Elements 11 for Mac - $79
    GraphicConverter - $40
    Rainbow Painter - $30
    Imagerie - $38
    Acorn - $50
    Pixelmator - $60
    Seashore - Free
    GIMP for Mac - Free
    Xee 2.1 - free

  • I AM TRYING TO PUT TEXT ON A PHOTO AND USE THE T ON THE BOARD BUT I GET A MESSAGE SAYING PROGRAM ERROR AND IT DOSNT LET ME PUT ANY PRINT .

    I AM TRYING TO PUT TEXT ON  A PHOTO USING THE T ON THE BOARD. I GET  A MESSAGE SAYING PROGRAM ERROR AND IT DOSNT LET ME ADD TEXT.

    There's something wrong with your Photoshop install.
    BOILERPLATE TEXT:
    If you give complete and detailed information about your setup and the issue at hand, such as your platform (Mac or Win), exact versions of your OS, of Photoshop and of Bridge, machine specs, what troubleshooting steps you have taken so far, what error message(s) you receive, if having issues opening raw files also the exact camera make and model that generated them, etc., someone may be able to help you.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • How to put text in pdf on ipad

    How to put text in pdf on ipad?

    The only text you can attach to a PDF in the current Adobe Reader is a "note" comment. If you tap the comments button (the cartoon cloud with pencil) and choose the "note" comment (the cartoon cloud) you can add a note.

  • How can I put text on individual photos

    I would like to put text on some of my photos,,,,How?

    Aperture really isn't designed to put general text on an image.You could cobble something together using the Book interface but I don't think it would really be a suitable solution.
    You'll need to look into using a plugin, BorderFX is a free plugin that many users her (including myself) have used. It does what you are looking for and works well.
    regards

  • I often have to open files .cue with Text Edit. Right Click, Open with, Others, Text Edit. Is it possible to put Text Edit in the menu avoiding to use "others"?

    I often have to open files .cue with Text Edit. Right Click, Open with, Others, Text Edit. Is it possible to put Text Edit in the menu avoiding to use "others"?

    The easiest way is to keep Textedit in the Dock and drag the .cue file(s) to the Dock icon.
    You can also create an Automator Service:
    Open Automator
    Select: Service
    Select Service receives selected [files or folders] in [Finder]
    and:
    Then select one or more .cue file, right click (or Control-click) on the selection to display the contextual menu. Scroll to the bottom of the contextual menu and select Services -> (what you named the Service).

  • I have bought a Macbook Pro Retina, and the iPhoto which comes with it, has a different iPhoto Book menu.  I cannot see how to put text at the bottom of the pages of photographs, instead of the default place in the middle.  Is there a way to do this?

    I have bought a Macbook Pro Retina, and the iPhoto which comes with it, has a different iPhoto Book menu.  I cannot see how to put text at the bottom of the pages of photographs, instead of the default place in the middle.  Is there a way to do this?

    There are different templates for iPhoto books and they differ from version of iPhoto to iPhoto, so explore the other options.

  • How to put text in a shot

    Can' t find a way to put text in a videopart

    Thanks for your help
    Op 26 mei 2014, om 16:14 heeft A.T. Romano <[email protected]> het volgende geschreven:
    How to put text in a shot
    created by A.T. Romano in Premiere Elements - View the full discussion
    rik de boer
    Thanks for the reply.
    Premiere Elements 11 Mac.
    Best go to the Expert workspace so that you can see what is going on. If you need to use the Quick workspace, then I will point to those directions next.
    Expert workspace
    Video on Video Track 1
    Move the Timeline Indicator to where you want the Title placed
    Go to Text Menu/New Text/Default Text and click on Default Text
    When you do the Titler will open, displaying its Text (opened), Styles, Animation, and Shapes sections.
    At the same time, the title will be placed on Video Track 2 at the location of the Timeline Indicator on the Timeline.
    When you are finished creating the Title, you have click the "Done" arrows, and the Title is closed, you can always open the Title for more edits in the Titler by double clicking the Title on the Timeline Video 2.
    Please review the Creating Titles details in the Adobe document. If you run into any difficulties, please post what they are and we will work through them with you.
    Later on when you have progressed with your Titles creation, you might want to check out the following
    ATR Premiere Elements Troubleshooting: PE: Titler - Part 1 Text Animations
    ATR Premiere Elements Troubleshooting: PE: Titler - Part 2 Styles
    ATR Premiere Elements Troubleshooting: PE11: Titler Shapes For Highlighting
    We will be watching for your follow up.
    Thanks.
    ATR
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at https://forums.adobe.com/message/6409739#6409739
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    To unsubscribe from this thread, please visit the message page at . In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Premiere Elements by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • How can i put text across a photo?

    how can i put text across a photo?

    You'll need an external editor for that:
    In order of price here are some suggestions:
    Seashore (free)
    The Gimp (free)
    Graphic Coverter ($45 approx)
    Acorn ($50 approx)
    Pixelmator ($50 approx)
    Photoshop Elements ($75 approx)
    There are many, many other options. Search on MacUpdate. You can set Photoshop (or any image editor) as an external editor in iPhoto. (Preferences -> General -> Edit Photo: Choose from the Drop Down Menu.) This way, when you double click a pic to edit in iPhoto it will open automatically in Photoshop or your Image Editor, and when you save it it's sent back to iPhoto automatically. This is the only way that edits made in another application will be displayed in iPhoto.

  • Putting text in the soldermask

    Hi,
    Is there a way to put text in the solder mask layer?
    When I try to do so (select solder mask top or bottom/place/graphic/text), the text button is grayed out.
    I'm using Ultiboard V10.01
    I'd like not to add an extra silkscreen, for the few letters that nee to be placed in a new layout....
    this way, the board will be a little cheaper...
    Thanks
    Stressed user

    For putting text in the Soldermask Layer use DXF import

  • I would like the bookmark (drop version) button to not have text beside it saying "Bookmarks"

    I love the new FireFox 4. Looks great. Feels great. Top of the game. Best browser ever.
    There are two versions of the bookmark(s) button. The 1st is just a folder/star icon that when pressed, opens up a panel with your bookmarks. I hate that one. Never use it.
    The 2nd is similarly a folder/star icon, but functions as a dropdown menu. That version, I love. Problem is, it (the bookmark button itself) ALWAYS has text beside it saying "Bookmarks" -- hogging up my toolbar space. Is there any way to remove said text?
    There used to be an add-on that replaced or added a new dropdown bookmark button to the customize menu, but it's not compatible with the latest FF.
    I can't help but think there's an easier way than creating/installing a WHOLE addon just to remove some (1 word) of text.
    Thanks in advance!
    Cheers.
    EDIT: I would also like to add, that yes, I'm not a noob, and have the "Show: Icons (only)" option enabled within the Customize Toolbar menu -- it STILL shows text for only this (bookmarks dropdown) button.

    Add code to [http://kb.mozillazine.org/UserChrome.css userChrome.css] below the @namespace line.
    <pre><nowiki>@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
    #bookmarks-menu-button .toolbarbutton-text {display:none!important}
    </nowiki></pre>
    See:
    * http://kb.mozillazine.org/Editing_configuration
    * ChromEdit Plus: http://webdesigns.ms11.net/chromeditp.html

  • How can I put text in transparent background?

    How can I put text in transparent background?
    Message title was edited by: Brett N

    Good day!
    You can create a new document (»Background Contents« set to »Transparent«), use the Type Tool (T) to create text and then save in a format that supports layers like psd, psb, tif.
    If the receiving application can’t handle those png24 is another option.
    Regards,
    Pfaffenbichler

Maybe you are looking for

  • Recovering Data from a dead iMac G5

    My iMAC G5 has had it's second logic board failure in the past 1.5 years. The repair shop says it's going to cost $550 to repair, and Apple's not going to cover a 2nd board replacement under the extension program. Given that the computer's 4 years ol

  • Dbwr consuming high CPU after enabling DirectIO

    Hi, DBWR is consuming high CPU. After enabling DirectIO on Solaris SPARC 10, dbwr is eating away almost 1 CPU on a v440 machine i.e. 19% throughout the day. Neither of "buffer busy waits" or "write complete waits" or "free buffer waits" are in the to

  • What is the minimum spec for a Macbook Pro to run FCPX?

    I have FCP X installed on my 2009 iMac which has 8Gb of RAM. It works okay, more or less, but I need the portability of a laptop. As cash matters, what is the cheapest Macbook Pro option?  I would boost the RAM to 8gb but what else woud I need? I wou

  • Dataset can not be open error while running report rtcctool

    Hello Experts, While running report rtcctool we are gettin following dumps the says ABAP runtime errors    DATASET_CANT_OPEN        Occurred on     05/27/2011 at 10:00:52 Unable to open file "/usr/sap/B**/DVEBMGS00/sec/SAP_AGS_OLCNT_VERIFY.pse". I am

  • Control report program by using pushbuttons

    Hi Experts, I need to create a selection screen with text boxes, radio buttons and Push buttons. Whenever I enter some value in text box and press the PUSHBUTTON, the report should upload one file from local drive(like D: C: or Desktop) and need to u