Different fonts in a single text component

I need to use two different fonts in a text component.
Note, In the beginning the text component will contain text in font1 and
in run time i have to insert some strings with font2.
I think it is not possible with JTextArea.
Which one is suitable JEditorPane or JTextPane or JTextComponent.

I think it is not possible with JTextArea.
Which one is suitable JEditorPane or JTextPane or JTextComponent and how ?
Thanks
SENTHIL

Similar Messages

  • Apply different font styles in single text frame

    hi all
    how can i apply different font styles in a single text frame using indesign script ?
    for example :
    "dasdnasndasndlasndnasdlasdasdas"
    may i know is it possible to do that and how to do that ?
    thanks

    You can set (as well as read) every single property of any text range with scripts. This is javascript; it assumes you text cursor is inside a frame with some text.
    * Setting some specific characters to a color:
    app.selection[0].parentStory.characters.itemByRange(5,10).fillColor = "Red";
    * Change the font of words:
    app.selection[0].parentStory.words[3].appliedFont = "Arial\tBold";
    * .. or just the style:
    app.selection[0].parentStory.lines[2].fontStyle = "Italic";
    * .. or any other attribute (this one requires you to have at least 5 characters selected):
    app.selection[0].characters[5].underline = true;
    Of course these operations are not limited to something you select; they work the same with any text frames you can refer to.
    app.activeDocument.textFrames[1].paragraphs[2].appliedCharacterStyle = "charstyle";

  • Use 2 different fonts in a dynamic text field with tf.htmlText?

    i've got a dynamic text field on the screen and all of my
    fonts embedded. is it possible to use 2 different fonts when
    dynamically setting the fields text with the htmlText property?
    i've tried the <font> and the <textformat> tags and
    neither work. I can set it once via a texformat object, but that's
    it.
    thanks

    you're answering all of my questions today aren't you? :)
    right, i think this will be hard since my data is all comming
    from XML and i have no way to specifically set text ranges as
    different fonts within a string.
    i've told the developers to just use images for the special
    characters.

  • How to use two different fonts in a single label?

    Hello all,
    Is there any way to use font of 2 different size and color for a single label?
    Looking for a quick replies from you.
    Regards,
    Obaid

    No. One label, one font, size and color.

  • Different functionality of 'value2' Single Value component in 2008?

    I've recently upgraded from cx4.5 to 2008 and have found that the single value 'value2' component behaves very different.  In cx4.5, when the data was a cell with a formula there was no user interaction.  Under 2008, the user can interact with the component.
    Does anyone know how to disable interactivity so the value2 component can be used to display a value only?
    Thanks

    It's possible to work around the issue by changing "Behavior" -> "Increment" to zero.  The cursor still changes to the double arrows, but the number stays the same.  Not perfect, but workable.
    I find it ironic and irritating to note that now, not only do my toggles for contextual help lack any mouseover changes to indicate that there is interaction there, but my value outputs coincidentally have a meaningless mouseover change that shouldn't be there.

  • Bullet Using Different Font than Body Text

    I would like to have a bullet that uses a different font than the body text. Say, for text I use Verdana, and for the bullet I would like to use a glyph from Zapf Dingbats. I seem to not be able to figure out how to set this up -- the bullet always uses the same font as the text.
    Thanks for your help.
    -- Stefan

    If you Option-Click on the bullet character, you can select it on its own, separate from the body text. You can then apply whatever font you want, and in the Text Inspector, in the Bullets palette, you can type whatever character you want in the Text Bullets field. (If you want this character for all of your bullets, it would be easiest to do this editing on the slide masters, rather than the individual slides.)

  • Use of multiple Applications for single webdynpro component in ABAP WEB DYNPRO

    I am working on a object which have multiple webdynpro applications for single webdynnpro component.How to assign a different functionality to each application bcoz when we right click on webdynnpro component and select create webdynpro applications ,it just creates a application how so we assign diff functionality to each of them .Also in the parameter tab of the webdynpro applications ,there is a diff config id mentioned for each application.what is its relavance

    Hi Sam,
    Different functionalities for a single webdynpro component can be achieved by many ways. Among them is the use of multiple applications. Say for example if you want different views/windows to be displayed at the start up, you can achieve it by specifying at the default window, for each every webdynpro application.
    And if you want control the fields, say for example you want to display input fields as editable for one application and read only for other application, you can achieve it through application parameters. Based on parameters, in HANDLEDEFAULT method of window controller , you can specify the type of behaviour , whether it has to editable or not based on parameters and same can be used at context binding of UI properties. 
    Application configuration can be used for personalization.Web Dynpro ABAP Application Configuration. This tutorial would help you understanding the concept much better. There can be multiple application configurations for a single application.
    Regards,
    Harsha

  • Custom text component with different start and end points for each line

    I'm trying to create a custom component extending textArea in which each individual line in the textArea would have different start and end points.  For example, the start/end points for line 1 might be 20 pixels in the front and 35 pixels at the end but start/end points for line 2 might be 25 pixels in front and 20 pixels at the end, etc.  These boundary values would be passed in.  The width of the entire textArea component would be a fixed size.  The result would be something like this:
         Jack and Jill
              ran up the hill
      to fetch a pail of water
    depending on the boundary values of each individual line of course.  The custom component would take a string and render it in the text component with the appropriate individual line start and end points.  I'm trying to do this by adding the text component to the display with the passed in string and then adding in spaces in the beginning of each line and adding a "/n" at the end of the line wherever appropriate based on the start and end values for that line.
    Just wondering if I'm on the right track and if anyone has any advice on this.

    > Applying the marker places the same icon on all lines of the graph and I need a different one for each
    What do you have selected when you assign the marker? It
    shouldn't apply to all the markers on the whole graph unless you have all the existing markers selected when you apply the new one.
    Assigning marker designs is exactly analogous to assigning bar graph designs.
    If you have a single marker selected when you assign the new design, it will apply to only that graph data point.
    If you use the group select tool (or option-click with the direct select tool) to reclick on an already-selected marker until all the markers for the same line are selected, and then assign a design, the new design will apply only to the selected line. (You can extend the graph by adding more rows, and the new data points will inherit the marker for the line they are on.)
    The thread linked to below demonstrates in more detail how the marker designs are scaled:
    http://www.adobeforums.com/cgi-bin/webx/.3bc10970/0

  • Text in different font or different style

    hi,
      im writing text in my window.i want to have some text in one font size &some part of the text in different font size or in different  font family.i tried but all the fontsize is same (which i created in STYLE).how can i do this?please help

    Hello,
         Use Paragraph formats and
               Character formats for ur requirement.
    While writing the code give ur format as Paragraprh and where ever u want to change specify character formats.
    Check this link for Paragraph formats
    http://help.sap.com/saphelp_47x200/helpdata/en/d1/802e02454211d189710000e8322d00/content.htm
    Check this link for Character formats
    http://help.sap.com/saphelp_47x200/helpdata/en/d1/802e43454211d189710000e8322d00/content.htm
    Regards,
    Deepu.K

  • Is it possible to create different font styles within the same text field?

    The form I am creating is getting really complex because when different fields require different font treatments (bold, italic, different font size, different font) I have to create a seperate text box and get it to align with the others. This wouldn't be an issue in most cases but this form is really detailed and has many text boxes. Before I stuggle too much longer on it, I thought I would check and see if there is a way to make them all in the same text field. If not, perhaps I am trying to use Acrobat for something it is not meant for. Any recommendations on other programs I could use? Thanks

    Thank you try76. I'm not sure if I did it correctly. As soon as I tick the Rich Text Formatting box it automatically changes the appearance of the text in the field (Helvetica Light to something like Helvetica Heavy) I can't seem to get the font back to Helvetica light or change the font size while the Rich Text Formatting box is ticked.

  • Different fonts in same text item....

    Hi Everyone,
    We have a requirement that we should use more than one font in the same text item. We have shortcut to toggle between the fonts (if you are familiar its NUDI used for Kannada Font). So we should make it possible that they can edit both kannada and english in the same field. And, after toggling between the fonts, previously added data should not change.
    Thanks in advance,
    Yathish

    For any fonts you will use you OAS must support it, but as I said in my previous post, you cannot have two different types of fonts in the same text item natively.
    It may be possible if you use a PJC.
    Regards,
    Tony

  • I want to display the both Hindi and English font in single text object

    hi...
    my problem is i want to display both Hindi and English font together in a single text object...
    the data is retrieved from Database in detail section...
    is there any font which supports both Hindi and English font for single text object...
    help me...

    hi Vinayak,
    If I understand your requirement, your field has full length word.
    Now we should split this field into 3 parts.
    Please Create 3 formulas.
    Part1
    stringvar s1;
    s1:= left({field}, InStr({field},"("));
    s1;
    Part2
    stringvar s2;
    s2:= Mid({field},InStr({field},"(")+1 ,InStr({field},")")- InStr({field},"(") -1);
    s2;
    Part3
    stringvar s3;
    s3:= Mid({field}, InStr({field},")"));
    s3;
    Now Place  a Text box in required section. Drag these 3 formula fields into the Text box.
    Right Click the Part2 and apply mangal font.
    Right Click the Part1, Part 3 and apply Arial font.
    I have tried this and implemented successfully. Please let me know if you still face any issue.
    Regards,
    Vamsee

  • Want to display the both hindi and english font in single text object

    hi...
    my problem is i want to display both Hindi and English font together in  a single text object...
    the data is retrieved from Database in detail section...
    is there any font which supports both Hindi and English font for single text object...
    help me...

    hi,
    Is your single Text object contains combination of two strings?
    for example:
    {State}{City}
    If yes,
    Right Click the 1st string object within the Text box and 'Text Formatting' specify the  Hindi Font
    Right Click the 2nd string object within the Text box and 'Text Formatting' specify the  English Font.
    Regards,
    Vamsee

  • Can I show different fonts and colors text on 1 multi-line text fields?

    I want to format different messages on 1 mutli-line field with different fonts and colors for the heading lines. Can I do that in Forms 6i ?

    You must use in trigger Post-query the sentence:
    Example:
    DECLARE
    cur_itm VARCHAR2(80);
    cur_block VARCHAR2(80) := :System.Cursor_Block;
    BEGIN
    cur_itm := Get_Block_Property( cur_block, FIRST_ITEM );
    WHILE ( cur_itm IS NOT NULL ) LOOP
    cur_itm := cur_block||'.'||cur_itm;
    Set_Item_Instance_Property( cur_itm, CURRENT_RECORD,
    VISUAL_ATTRIBUTE,'My_Favorite_Named_Attribute');
    cur_itm := Get_Item_Property( cur_itm, NEXTITEM );
    END LOOP;
    END;

  • Please help with choosing the right text component

    Hello,
    In my applet, I need a single-line text component with the following capabilities:
    1: Support for bold font (entire text,not just part of it)
    2: Support for underlined text (entire text,not just part of it)
    3: Support for blinking text
    4: Ability to put caret anywhere within the text field with mouse
    5: Support for field validation
    6: Ability to handle various key events and modify the text and/or move around caret position accordingly.
    Now, I know there are at least 4 different text components: JTextField, JTextArea, JEditorPane, JTextPane. Which one of these is most suitable for the above features? Is it possible to use JTextField to support all of the above?

    Here is a link to the Java Swing tutorial which discusses the text components.
    http://java.sun.com/docs/books/tutorial/uiswing/components/text.html
    I think you need to use a JEditorPane or a JTextPane (although I'm not sure any of the components support blinking text). A demo program shows some of the capabilities of these components:
    http://java.sun.com/docs/books/tutorial/uiswing/components/generaltext.html

Maybe you are looking for

  • How to change Default number of rows displayed in a Briefing Book

    Hi, We have a requirement to deliver a dashboard containing 7 dashboard pages to the business users. To achieve this, I have created a briefing book by adding all the required dahboard pages and scheduled an agent to deliver the briefing book in PDF

  • Binary Project

    Hello, I am a collge student taking a DF class where we are working on a project for a Department of Defence Challange where I need to get inside a wav file and get hidden information from it. Im to the point where I need a means of getting the LSB (

  • Error when doing a Discovery Search Export In Office 365

    Hi.. I am trying to a do eDiscover Search on a User Mailbox in office 365, however am getting an Status with Partial success and giving a message that certain items were not found. I am doing a full search include all items and unsearchable items as

  • Spry Widget Slideshow Basic works on local but not on remote server

    I have tried everything imaginable and I can't make this slideshow work from the remote server.  I get the massages: SpryPanelSet.js requires SpryWidget.js! SpryFadingPanels.js requires SpryPanelSet.js! SpryImageSlideShow.js requires SpryWidget.js! S

  • Basic IM app number of simultaneous connections

    Hi all, i wanted to know how to calculate or estimate the number of simultaneous connections that one Flash Media Server installation (one licence, one server) can handle, in the scope of a basic Instant Messaging application (online presence and tex