How do paint a part of text in the textarea ?

can i paint (in different color ) just a part of a text in the
textatra ?
pease help

if you're fluent in html, you can use JEditorPane like so:
JEditorPane j = new JEditorPane("text/html","");Then you can use html in it like this:
j.setText("<font color=green>green</font>,<font color=red>red</font>");More information:
http://java.sun.com/j2se/1.4/docs/api/javax/swing/JEditorPane.html

Similar Messages

  • How user can get a Sales Text for the any Line Item in the Billing?

    Salute Masters ! !
    How user can get a Sales Text for the any Line Item in the Billing?
    It's coming for other Order (Line Item for Bought out Item at Project Site - Some Item they procure at project site & complete the task).
    Where I can configure in system for all.
    Rgds
    Srivastav
    09973504950

    Hi,
    Sales text can be copied from customer to order , order to delivery and delivery to billing .
    Check the T-code : VOTXN , do the customization as per your requirement.
    check the below link :
    http://help.sap.com/saphelp_erp60_sp/helpdata/en/dd/55f993545a11d1a7020000e829fd11/content.htm

  • How to Align Text in the TextArea

    How to Align text in the TextArea. My purpose is that I want to post the records after retrieving from database. All the records in each fields should keep aligned like Oracle WorkSheet.
    I want this way
    Code Name Place City
    a01 nilopher swiss street japan
    a02 rozina lovely street aus
    a03 benazir king's camp pitsburg
    and the out put should not look like this :-
    Code Name Place City
    a01 nilopher swiss street japan
    a02 rozina lovely street aus
    a03 benazir king's camp pitsburg
    here place and city records are getting disturbed accordingly the length of name.

    Well, first off (if it's not default, that is) you must set a monospaced font on the TextArea, unless you want to count pixelwidth of each and every string and then do an estimate on how many fill blanks you want...
    If you have the each string as a line, you use a StringTokenizer on it, extract each token, put all the tokens for that line into an array of strings.
    When every line is done, you compare the length of the nth String of each array and save the highest numbers.
    Then you reassemble each line from the arrays and pad in spaces where the tokens are too short.
    HTH,
    Fredrik

  • How to get the text of the textArea ?

    Hi, expert
    i have created a new component com1,
    then i created a table view name 'result'.
    then i add a textarea by modifying the result.htm
    textArea id     = "TAMSG"
                     text   = "test......"
    then i add a button in the result.htm
    the method of the button is  'EH_ONSENDMSG'
    then i input some text into the textArea on the page.
    now, how can i get the text of the textArea in the method 'EH_ONSENDMSG' ?
    thanks.
    oliver.

    Hi,
    problem was solved.
    i put the text into a value node.
    <thtmlb:textArea id     = "TAMSG"
                     text   = "//TEXT/TEXT2"
                     encode = "TRUE"
                     width  = "100%" />
    method EH_ONSENDMSG.
      DATA lr_col_wrap      TYPE REF TO   cl_bsp_wd_collection_wrapper.
      DATA lr_query_values  TYPE REF TO   if_bol_bo_property_access.
      DATA lv_str_msg TYPE string.
      lr_col_wrap = me->typed_context->text->get_collection_wrapper( ).
      lr_query_values ?= lr_col_wrap->get_current( ).
      lv_str_msg = lr_query_values->get_property_as_string( iv_attr_name = 'TEXT2' ).
    endmethod.
    regards.
    oliver.

  • My friend has an iPhone but doesn't use iMessage. How can I send her regular texts with the new iOS 7 update?

    My friend has an iPhone but doesn't use iMessage. How can I send her regular texts with the new iOS 7 update?

    That's because her phone is recognized in the Apple database as an iPhone.  It should eventually convert to SMS but that's above my level of expertise here so hopefully someone else can come along and help you further.  She could just turn on iMessage and solve the problem. Ha!
    Good luck!

  • How to store images along with text in the database    ------its urgent

    i'm developing an application which will be similar to to the page which we use for posting the forum. if in a text field we enter some text and an image how does we store the whole the information in database which in the textarea (both the text entered and the image) and how it can be extracted as if the user entered

    Hi,
    Refer thsi link, this may help you
    http://www.sap-basis-abap.com/saphr003.htm
    Call the FM BDS_BUSINESSDOCUMENT_CREATEF to upload the images from System.
    codeLOGICAL_SYSTEM
    CLASSNAME PICTURES
    CLASSTYPE OT
    CLIENT 321
    OBJECT_KEY ZIMAGE [/code]
    and the table parameter Files pass
    code DOC_COUNT 00000001
    COMP_COUNT 00000001
    COMP_ID
    DIRECTORY C:\
    FILENAME WINTER.JPG
    MIMETYPE
    [/code]
    now check it.
    here you can upload multiple images inside a loop call the FM.
    Regards,
    Shiva.

  • How to fetch Positon and Job text for the employee

    Hi all,
    How can I fetch the Postion and Job text from the infotype HRP1001 contains in last fields.
    When I'm picking it takes from the last latest record, but in PA30 picks the next to the latest records some times.
    Please help me in this.
    Thank you!
    Prasad

    Hi,
    You can use standard function:
    With object id got from infotype 1001 (sobid) u can fetch descriptiosn from infotype 1000.
    data: ti_i1000 LIKE p1000 OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'RH_READ_INFTY_1000'
          EXPORTING
            plvar            = '01'                   " Version plan usually 01
            otype           = 'C'                     " C = Funcion, S = Position
            objid            = p_objid              " Object ID function or position
            begda          = p_begda
            endda            = p_endda
          TABLES
            i1000            =  ti_i1000        " Inoftype 1000 structure
          EXCEPTIONS
            nothing_found    = 1
            wrong_condition  = 2
            wrong_parameters = 3
            OTHERS           = 4.
    Then you can use field ti_i1000-stext.
    Hope this helps.
    Daniel
    Edited by: Daniel Siñani Cardenas on Jun 30, 2009 11:05 PM

  • How can I move then main text in the San Francisco - CV? I moved my name (the box) and adress by just moving them up. But cant move the text!?

    Hi how can I move the main text in the "San Fransisco CV" up.
    The name thats in the "box" as the "adress" ect, is easy to move up...
    But the main text please...
    BR,
    D

    David,
    The various templates in Pages seem to have been designed by individuals without much guidance or mandate for standard approaches to layout. In a way, tha's good because you have a variety of philosophies to choose from.
    The message is that you can't take what you learned here and assume that all the templates work this way. I answered your question by turning on the Layout View and looking at the Inspectors to see what controls had been used.
    Jerry

  • How do I select similarly colored text using the magic wand?

    I converted a large document from RGB to CYMK (File | Document Color Mode). I'd like to select all of the text that was RGB(0,0,0) and is now CMYK(75.02,67.97,67.02,90.16) so I can change it to CMYK(0,0,0,100). I think the magic wand is the way to do this (correct me if I'm wrong).
    I have text in a dozen or more text areas. Many of the text areas overflow text into another text area. Some of the text in the text areas is "black" but there is also text with other colors that I'd like to remain unchanged.
    For example, I'd like to select all of the black text in the following two text areas without selecting the red text. I thought  that I could click on the black text and have all the black text (but not the red text), selected, but the entire text box is selected (and nothing in the second text box is selected). Can the wand select some text within several text boxes? If not, how should I go about changing the black? Thanks.

    Thanks Mylenium.
    If I use the Same Fill command, it does select both text areas. But if I then choose a replacement color (e.g., CMYK(0,0,0,100)) all of the text in both text areas is changed to black (i.e., the red text in my above illustration also changes to black).

  • How do I get rid of text in the browser fill area after site publication?

    I want to thank all ot the folks who have helped me here in the Adobe Community. I'm new at this thing and have done fairly well with the exception of a few problems between the monitor and the chair.
    I have published my site on the business catalyst temp host. I also uploaded the site to a ftp host (ATT web hosting), aabeaumont.org. Today and yesterday I have a page title text showing up in the brouser fill area on both hosts. What am I doing to cause this issue and what do I have to do to get rid of the unwanted text. The text shows up differently as I go to each page in the primary site map.
    Again, thank you for your time and help.  aabeaumont.org

    Hello,
    It may be possible that the HTML for head (Page Properties -> Metadata) section contains a tag etc. that hasn't been properly closed. You may want to check that once.
    Hope this helps.
    Cheers
    Parikshit

  • How to extract a part of text using utl_file

    hi,
    I have a small requirement which goes as follows. I have a text file which is a resultof the sql query and it contains 16 columns as TAB delimited text . I am using the UTL_FILE package concept to read the data. In general when we use the UTL_FILE.GET_LINE we read the entire line of text. But i need to read the 10th column of the query or the tab delimited text .
    Please advice.
    My query goes something like this:
    declare
    f utl_file.file_type;
    s long;
    c number := 0;
    begin
    f := utl_file.fopen('ABC_EXTRACTS','sample1.txt','R');
    loop
    utl_file.get_line(f,s);
    insert into s values (s);
    c := c + 1;
    end loop;
    exception
    when NO_DATA_FOUND then
    utl_file.fclose(f);
    dbms_output.put_line('No. of rows inserted : ' || c);
    end;

    prazy the one which you have specified above seems to work fine .but if a word is seperated by the space it is considering as tab (space delimited is considered as tab limited by your query)delimited .
    with T as (
    select 'john sam alfred nobel samuel thomas' col1 from dual)
    select regexp_substr(col1,'[^      ]+',1,4) from t
    here alfred nobel is a single name and is seperated by a space .the above query returns nobel but we need samuel .
    What i mean to say is space delimited should not be taken into consideration when tab delimited is considered(since if 4 is replaced by 5 in the above query we may get samuel) .
    Please advice

  • How do I change icons to text in the Control Panel?

    Hello,
    I'm trying to follow along with a video at Lynda.com on AI CS6.
    However, in the video, Deke McClelland is showing the TEXT "Align" on the top Control Panel.
    On my screen, it's not a text, but a small icon. When I click it, I don't get the same options he does.
    I've searched and searched and can't find how to get MY screen to look like his. I have even tried to "Reset Essentials" (the workspace he's using) and still no luck.
    Please help.
    Thank you.

    The align panel in the control bar is dependent upon the setting. For example, if you have one object selected and align is set to "Align to Selection" you will only see an icon. However, click the icon and change it to "Align to Artbaord" and you should see all the align options.
    I think I may have had the order reversed a bit previously. On the smallest screens only a text link is shown. My guess would be the lynda videos are often shot with a laptop and a small screen.
    As far as I'm aware, you can not change whether the Control Bar shows icons, or text links short of reducing your monitor resolution.

  • How to insert single colon xml text in the xml table

    Dear Sir,
    how to insert special characters like single colon text example (don't) xml text in to the xml table
    please see the following example its giving me error quoted string is not ended properly
    SQL> insert into ftr_ctl values (1,
    2 xmltype('<po:root xmlns:po="http://www.oracle.com/FC.xsd"
    3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    4 xsi:schemaLocation="http://www.oracle.com/FC.xsd
    5 http://www.oracle.com/FC.xsd">
    6 <row>
    7 <UniqueIdentifier>urn:x-gcs:def:featureType:GFDD::FT_DFDD_100565</UniqueIdentifier>
    8 <AlphaCode>ZB032</AlphaCode>
    9 <Name>Baseline Point</Name>
    10 <Status>Submitted</Status>
    11 <Definition>A location that serves as a point on, and which partially defines a segment
    of, a national boundary baseline.</Definition>
    12 <Description>May be monumented or unmonumented. A national boundary baseline is used fo
    r defining the landward edge or margin of a nation's various contiguous zones such as the 3 and 12 n
    autical mile limits and the Exclusive Economic Zone (EEZ).</Description>
    13 </row>
    14 </po:root>'));
    ERROR:
    ORA-01756: quoted string not properly terminated
    how to solve single quotation like (nation's) in xml data insertion
    please give me reply as soon as possible
    Thanks
    Kabeer

    Hi,
    Use &#x7B;code} tags to post formatted code on the forum.
    That way, your code will be more readable for everyone, and more importantly here, everyone will be able to clearly see what's bothering you :
    &apos;sThe single quote was encoded with the character entity reference "&amp;apos;".
    The conversion is not mandatory but it happens Oracle is doing it in this case.
    It shouldn't be a problem though.
    If you want to extract the value afterwards, it'll come as expected :
    SQL> create table ftr_ctl (id number, doc xmltype);
    Table created
    SQL> insert into ftr_ctl values (1,
      2  xmltype('<po:root xmlns:po="http://www.oracle.com/FC.xsd"
      3  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      4  xsi:schemaLocation="http://www.oracle.com/FC.xsd
      5  http://www.oracle.com/FC.xsd">
      6  <row>
      7  <UniqueIdentifier>urn:x-gcs:def:featureType:GFDD::FT_DFDD_100565</UniqueIdentifier>
      8  <AlphaCode>ZB032</AlphaCode>
      9  <Name>Baseline Point</Name>
    10  <Status>Submitted</Status>
    11  <Definition>A location that serves as a point on, and which partially defines a segment of, a national boundary baseline.</Definition>
    12  <Description>May be monumented or unmonumented. A national boundary baseline is used for defining the landward edge or margin of a nation''s various contiguous zones such as the 3 and 12 nautical mile limits and the Exclusive Economic Zone (EEZ).</Description>
    13  <Alias xsi:nil="true"></Alias>
    14  <SourceItemIdentifier>100565</SourceItemIdentifier>
    15  <SourceReference>DGIWG DFDD BL 2011-1.00</SourceReference>
    16  <SourceURL>https://www.dgiwg.org/FAD/fdd/view?i=100565</SourceURL>
    17  </row>
    18  </po:root>'));
    1 row inserted
    SQL> select extractvalue(doc, '/po:root/row/Description','xmlns:po="http://www.oracle.com/FC.xsd"')
      2  from ftr_ctl
      3  where id = 1
      4  ;
    EXTRACTVALUE(DOC,'/PO:ROOT/ROW/DESCRIPTION','XMLNS:PO="HTTP://WWW.ORACLE.COM/FC.
    May be monumented or unmonumented. A national boundary baseline is used for defi
    ning the landward edge or margin of a nation's various contiguous zones such as
    the 3 and 12 nautical mile limits and the Exclusive Economic Zone (EEZ).
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to set folder view to text wrap the tittles?

    Hi!
    I always use folder view to go through my documents, but some of the folder names are too big so it only shows the beggining and the end of each tittle. So it looks like this...
    How can I change that to show more lines and wrap the texts?
    kind of like this when you select it, but with more lines?

    Maybe this:
    Show Full File & Folder Names on the Mac Desktop
    Show Long File & Folder Names on the Mac OS X Desktop

  • How to perfectly align a JLabel text to the right

    if you compile and run this code:
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.border.EmptyBorder;
    public class JLabelAlignmentTest extends JPanel {
      private GridBagLayout gridBagLayout1 = new GridBagLayout();
      private JLabel jLabel1 = new JLabel();
      private JLabel jLabel2 = new JLabel();
      private JPanel jPanel1 = new JPanel();
      private JPanel jPanel2 = new JPanel();
      public JLabelAlignmentTest() {
        try {
          init();
        catch(Exception e) {
          e.printStackTrace();
      private void init() throws Exception {
        setBorder(new EmptyBorder(10, 10, 10, 10));
        jLabel1.setHorizontalTextPosition(SwingConstants.RIGHT);
        jLabel1.setText("888888");
        this.setLayout(gridBagLayout1);
        jLabel2.setHorizontalTextPosition(SwingConstants.RIGHT);
        jLabel2.setText("888881");
        jPanel2.setBackground(Color.orange);
        jPanel1.setBackground(Color.orange);
        this.add(jLabel1,  new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
        this.add(jLabel2,   new GridBagConstraints(0, 1, 1, 1, 1.0, 0.0,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
        this.add(jPanel1,    new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
        this.add(jPanel2,   new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
      public static void main(String args[]){
        JLabelAlignmentTest test = new JLabelAlignmentTest();
        JFrame frame = new JFrame();
        frame.setContentPane(test);
        frame.pack();
        frame.setVisible(true);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }you'll see that the JLabel which contains the text "888881" is not perfectly alignedto the right: the "1" character is handled as if it was larger (like "8" for example), so a few pixels remain on the right. I want any number to be EXACTLY aligned to the right, how can I work around this (little, I know) imperfection?
    thanks

    That is perfectly aligned, the "space" is in the make up of the font glyph. If you want to create your own font where each character is the exact same widht as each other, then feel free to do so (I for one wouldn't want to use it).

Maybe you are looking for

  • Read Only for "Group" and "Others" via SMB

    I see when Windows vista users of my OS X 10.5.8 server save a file to the server, the permissions show on the server as Read & Write for the owner and Read Only for 'Group' and 'Others'. Is there a way I can make the OS X server always make 'Group'

  • Appleworks 6.2.9 install default is wrong

    Newbie here.. I've tried to update Appleworks 6.0 with the 6.2.9 updater on my iMAC g3 Pismo with MAC OS X 10.3.9--but the installer quits with the message "The default location can't be found. the install will be cancelled" I've tried to find and re

  • Will daylight savings changes break OD if not done?

    I've got a client a few hundered miles away with a 10.3.9 open directory server. I'm not sure I can get over there to apply the DST patches before the time comes. Can this break OD authentication in some fashion if not done? Since the actual authenti

  • Nokia 5800 - UC Browser

    Hi all, I have found this great browser for my Nokia 5800 phone called UC browser I have been using it for quite some time and as you use it you find it knocks spots off the built in browser thats on my Nokia 5800. The pages all display correctly and

  • Where can I get the itab of generated sap query?

    Hi all, I generated a sap query which can display list of table in SAP ALV. Now I need to get the itab from the generated codes to perform some custom coding like sending the display list in email body message. Where can I get the itab now? From the