DataGrid Text Selection Color

In styling my application, I've used CSS to set the text
color for selected rows in a datagrid using the following:
DataGrid {
textSelectedColor: #ffffff;
When I compile and run the application, clicking on a data
row sets the color of the text to white, but if I click on another
row, the previously selected row stays white, and the newly
selected rows remains black. Is this a bug in the system, or am I
missing something?

Hmmm. I may have marked this as the answer too soon. I added
a creation complete item to my dataGrid so it looks like this:
<mx:DataGrid
creationComplete="setStyle('textSelectedColor',0xffffff)" >
and it compiles just fine, but seems to have no effect on the
behaviour. :-\

Similar Messages

  • Text selection color

    hallo!
    how can i have another color of the selection?? i found
    nothing by using F1.

    you can use setTextFormat() to assign several textformat
    instances to selected parts of any textfield.

  • Changing Selection Color in Word 2013

    When working with Word 2013, when I want to select a word or sentence, anything really, I often have trouble seeing exactly what I am selecting.  I think this is because the page is, of course white, but the selection is only a very light grey. 
    To be clear, I am not talking about highlighting, that is a different feature.  When I select text in the box I am writing in now, for example, the text is highlighted in blue and the text turns white.  In Word, however, the text remains black and
    the highlight is a light grey.  Even in changing my brightness settings, it remains almost impossible to see.  Is there a way to change the color of the selection?

    Hi,
    Thanks for your post. Unfortunately, the text selection color cannot be changed currently.
    I have collected the information and submitted it through our internal channel, you can also submit a Feature Request by yourself via Microsoft Support
    (Please note that no charges will apply but you might need to supply credit card information to get it registered):
    http://support.microsoft.com/select/default.aspx?target=assistance
    Our developers strive to capture Microsoft users' ideas and are working hard to create a more powerful and easy-to-use product.
    Thanks,
    Ethan Hua CHN
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • How to change the caret/selection color of text input controls?

    Hello JavaFX Community,
    i'm new to JavaFX. I'm using it since i saw the huge steps forward with version 2.0.
    I have the task to migrate a software from Swing to JavaFX. As a part of our corporate design, we used a special color for the caret and text selection. I couldn't find any information about changing the caret color in JavaFX 2, so i'd like to ask you and i'd be very thankful for an advise.
    There is a cross-post at StackOverflow:
    http://stackoverflow.com/questions/10057989/how-to-change-the-caret-color-in-javafx-2-0
    Thanks and best regards.

    This might be possible, but it is not trivial. You cannot do it with a standard API at this time, you will have to look into creating a skin that allows for these properties to be controlled.
    For example, the color of the caret is currently controlled in the TextFieldSkin (look for the "caretPath" property). Just forcing a color change in a subclassed skin is not so hard. Something like this:
    public class MyTextFieldSkin extends TextFieldSkin {
      public MyTextFieldSkin() {
        this.caretPath.fillProperty().unbind();
        this.caretPath.fillProperty().set(Color.RED);
    }However, it gets trickier if this color must be dynamic and if you want other things to be changed as well. It is a place to start though.
    Many of the skins methods and properties are 'protected' though, so atleast in Skin subclasses you have a lot of options to introduce new features and behaviour.

  • KdeGraphics-Okular - How to change the color of Text Selection tool

    Hello All
    I'm trying to know how to change/fix the color of the Text Selection Tool (Ctrl + 4). Because when I highlight the text, it's only one color (Dark Blue) that make me could not read clear.
    ---- My OS Configuration
    OS : Arch
    DE: LXDE
    WM: OpenBox

    The highlight color is determined by the system-wide color scheme that you're using. There's no way to change it only for okular.

  • Selection Color of a text box

    As one of the project requirements, I have to provide a
    functionality in my application to be able to change the selection
    color of the text box. Having no provision in Flash, I searched on
    the net and found one good example of doing that with
    flash.geom.ColorTransform and TextFormat classes. It works fine
    with windows. However, it doesn't work on Mac OSX. I am using Flash
    8 with AS 2.0 for development.
    I am seeking some support from all the brilliant developers
    here. Can somebody help me with a solution to this problem?

    Create 4 radio buttons, all called the same name, but with export values of cent.grn, cent.amb, cent.red, cent.blk.
    Then use this as the custom calculation script for the text field:
    var v = this.getField("myRadioButtons").value;    //Replace myRadioButtons with the name of your radio button group
    if (v=="cent.grn"){
    this.getField("tf.assmnt.stat").fillColor = color.green;    
    else if (v=="cent.amb"){
    this.getField("tf.assmnt.stat").fillColor = [ "RGB", 1,.5,0 ];
    else if (v=="cent.red"){
    this.getField("tf.assmnt.stat").fillColor = color.red;
    else if (v=="cent.blk"){
    this.getField("tf.assmnt.stat").fillColor = color.black;

  • Disable selection color in datagrid/list/tilelist?

    I have a datagrid and would like to disable the selection
    color. I disable the rollover color by using useRollOver to
    false.

    MXML
    <mx:DataGrid id="dg"
    selectionColor="dg.getStyle('backgroundColor')"/>
    AS
    dg.setStyle("selectionColor",
    dg.getStyle("backgroundColor"));

  • Error in selected text background color

    Here example.
    The selected text in white is really not good visible selected.
    Why flash does not suppor that?
    http://lionhead.nl/voorbeelden/flash_selected_text_error/Flash%20text%20error.html
    How come there is nowhere to set anything to make this work properly. Like in html does this automatic?
    Adobe is this a bug or not help for this?
    Regards,
    Michiel

    hii
    textPane.setSelectionColor(Color.YELLOW);
    its not work.bcz i want to highlight the selected text with color of my choice n if i select different text to highlight with different color then previous selected text should remain highlighted ...

  • Pre select datagrid with multiple colors

    how to pre select rows in a datagrid with multiple colors based on a condition?
    for eg: I have a status column.Based on the value of the status,the rows should be highlighted.
              if(status=='arrived'){
                   highlight in green;
              }else
               if(status=='delayed'){
                   highlight in red;

    try this, override drawRowBackground function
    public CustomDataGrid extends DataGrid
         override protected function drawRowBackground(s:Sprite,rowIndex:int,y:Number, height:Number, color:uint, dataIndex:int):void
              var item:Object = this.dataProvider.getItemAt(dataIndex);
              if (item.status == 'arrived')
                   color = 0x00FF00;
              else if (item.status == "delayed")
                   color = 0xFF0000;
              super.drawRowBackground(s, rowIndex, y, height, color, dataIndex);

  • How can I change the 'selected' color of one JToggleButton only.

    Hi,
    This seems like a simple / trivial question, but I just can't figure it out. Is there a way that I can create a JToggleButton and change the selected color of only that JToggleButton.
    I'm trying to create a simple sidebar like component for navigation within my app. A group of JToggleButton[s] added to a ButtonGroup (with the proper layout / sizing) works great, but the default JToggleButton colors don't suit my needs. I know that I can change the colors using the UIManager / UIDefaults, but I don't want to change the defaults for every JToggleButton in my app. I only want to change the defaults for a few select JToggleButton[s].
    For example, I can do this:
    UIManager.put("ToggleButton.select", UIManager.getColor("Table.selectionBackground"));
    UIManager.put("ToggleButton.background", UIManager.getColor("Table.background"));but I'd rather do something like this:
    JToggleButton jtb = new JToggleButton("Toggle Button Text");
    jtb.setSelectedColor(UIManager.getColor("Table.selectionBackground"));
    jtb.setBackground(UIManager.getColor("Table.background"));The only thing is, I can't find any method that is the equivilant of 'setSelectedColor(Color)' for JToggleButton.
    I know I could do it by adding some listeners to the JToggleButton[s], but that seems a little complicated for something like changing a color.
    I'd also seen a solution in the forums where someone had extended the ButtonUI of the pluggable look and feel they were using. I'm not interested in modifying the look and feel I'm using. As far as I'm concerned, that would defeat the purpose of having a pluggable look and feel as I would have to duplicate my efforts for every look and feel I want to use.
    Any help would be appreciated,
    Ryan

    try this
    import javax.swing.*;
    import java.awt.*;
    class Testing extends JFrame
      public Testing()
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setSize(250,75);
        setLocation(400,300);
        JPanel jp = new JPanel();
        JToggleButton jtb = new JToggleButton("Toggle me");
        jtb.setUI(new MyUI());
        jp.add(jtb);
        getContentPane().add(jp);
      public static void main(String args[]){new Testing().setVisible(true);}
    class MyUI extends javax.swing.plaf.metal.MetalToggleButtonUI
      public Color getSelectColor(){return Color.BLACK;}
    }

  • How can I change a the dropdown menu background according to the text selected?

    How can I change a the dropdown menu background according to the text selected?

    Read here about how to use the color object correctly:
    http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/wwhelp/wwhimpl/common/html/w whelp.htm?context=Acrobat9_HTMLHelp&file=JS_API_AcroJS.88.260.html
    http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/wwhelp/wwhimpl/common/html/w whelp.htm?context=Acrobat9_HTMLHelp&file=JS_API_AcroJS.88.261.html

  • I'm using an iMac running Os X Yosemite, Photoshop CS5 Extended, R2880 Epson printer  In the Print Settings dialog box, I can't select Color, Advanced BW or Grayscale unless I select "Printer Manages Color". The pull down menu is grayed out. Even with "pr

    I’m using an iMac running Os X Yosemite, Photoshop CS5 Extended, R2880 Epson printer  In the Print Settings dialog box, I can’t select Color, Advanced BW or Grayscale unless I select “Printer Manages Color”. The pull down menu is grayed out. Even with “printer manages color” the tif or jpg image comes out in color overlaid with black. (See example - printer1. image on left is close to what it should be). Photoshop has no updates pending. I’ve downloaded the latest Epson driver which was working fine just before the problem occurred

    Is your Photoshop CS5 updated to 12.1?
    Are you on Yosemite 10.10.1 or Yosemite 10.10.2?
    Did you apply the recent Epson software 2.1.9 update?
    What type of file is it (file format)?  What bit depth and what color space?
    BOILERPLATE TEXT:
    Note that this is 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 (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    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,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    etc.,
    someone may be able to help you (not necessarily this poster, who is not a Windows user).
    a screen shot of your settings or of the image could be very helpful too.
    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 get the default selection color from JTable

    Hi, there,
    I have a question for how to get the default selection color from JTable. I am currently implementing the customized table cell renderer, but I do want to set the selection color in the table exactly the same of default table cell renderer. The JTable.getSelectionBackgroup() did not works for me, it returned dark blue which made the text in the table unreadable. Anyone know how to get the window's default selection color?
    Thanks,
    -Jenny

    The windows default selection color is dark blue. Try selecting any text on this page. The difference is that the text gets changed to a white font so you can actually see the text.
    If you don't like the default colors that Java uses then use the UIManager to change the defaults. The following program shows all the properties controlled by the UIManager:
    http://www.discoverteenergy.com/files/ShowUIDefaults.java
    Any of the properties can be changed for the entire application by using:
    UIManager.put( "propertyName", value );

  • [ALV] Text in color and bold

    Hello,
    I have an ALV Grid and I would like one cell, with text color in red and in bold.
    I'm in OOP's with CL_GUI_ALV_GRID.
    I've tried like that :
    CONSTANTS :
                c_bold(4)           TYPE x       VALUE '00000020',
                c_red(4)            TYPE x       VALUE '00000017'.
    *-LAYOUT
      fe_layout-cwidth_opt = c_x.
      fe_layout-no_rowmark = c_x.
      fe_layout-info_fname = 'ROW_COLOR'.
      fe_layout-stylefname = 'CELLS_STYLES'.
    *-OUTTAB
      clear we_style.
      we_style-fieldname = 'XXXXX'.
      we_style-style = c_bold.
      we_style-style = c_red.
      insert we_style into table we_outtab-cells_styles.
    It doesne't work. The bold put the text color in black.
    There is a solution ?
    Thank you.

    Hello Bernard
    I checked my sample report and it shows that '00000037' yields the text in bold and red.
    '00000037' = '00000020' + '00000017'   !!!
    Below you find a modified version of the sample report:
      BREAK-POINT.
      CONSTANTS :
          c_bold(4)           TYPE x       VALUE '00000020',
          c_red(4)            TYPE x       VALUE '00000017'.
      CLEAR: ls_outtab2.
      REFRESH: lt_celltab.
      ls_outtab2-maxlen = 0.
      ls_outtab2-style  = c_bold.
      ls_outtab2-style2 = c_red.
      ls_style-style = c_bold + c_red.
      INSERT ls_style INTO TABLE lt_celltab.
      ls_outtab2-celltab = lt_celltab.
      INSERT ls_outtab2 INTO gt_outtab2 INDEX 1.
    ENDFORM.                    " FILL_OUTTAB2
    Entire report:
    *& Report  ZUS_SDN_ALV_STYLE_LIST
    *& Thread: [ALV] Text in color and bold
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1191290"></a>
    *& Thread: color alv list display
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1072435"></a>
    *& Thread: Hiliting the Specific rows in ALV grid
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1062831"></a>
    *& Thread: Reg... coloring of rows
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1041516"></a>
    *& Thread: Painting cell in alv with objects
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1029759"></a>
    *& Thread: styles
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="830498"></a>
    *& Thread: Is it possible to assign color to manually modified record in tabcontrol?
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="878289"></a>
    *& The report generates style values and shows their effect in ALV grid.
    REPORT  zus_sdn_alv_cell_style_2.
    TYPE-POOLS: abap.
    TYPES: BEGIN OF ty_s_outtab.
    INCLUDE TYPE knb1.
    TYPES: celltab TYPE lvc_t_styl. " cell style
    TYPES: END OF ty_s_outtab.
    TYPES: ty_t_outtab TYPE STANDARD TABLE OF ty_s_outtab
    WITH DEFAULT KEY.
    TYPES: BEGIN OF ty_s_outtab2.
    INCLUDE TYPE lvc_s_styl.
    TYPES: celltab TYPE lvc_t_styl. " cell style
    TYPES: END OF ty_s_outtab2.
    TYPES: ty_t_outtab2 TYPE STANDARD TABLE OF ty_s_outtab2
    WITH DEFAULT KEY.
    DATA:
    gs_layout TYPE lvc_s_layo,
    gs_variant TYPE disvariant,
    gt_fcat TYPE lvc_t_fcat.
    DATA:
    gt_outtab TYPE ty_t_outtab,
    gt_outtab2  TYPE ty_t_outtab2.
    PARAMETERS:
      p_rows    TYPE i DEFAULT 200.
    START-OF-SELECTION.
      SELECT * FROM knb1 UP TO 100 ROWS
      INTO CORRESPONDING FIELDS OF TABLE gt_outtab
      WHERE bukrs = '1000'.
    **  data: gr_kunnr    type RANGE OF kunnr.
    **  SELECT kunnr as low from knb1 into CORRESPONDING FIELDS OF TABLE gr_kunnr
    **    WHERE bukrs = '1000'.
      PERFORM set_layout_and_variant.
      PERFORM set_cell_style.
    **  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
    **    EXPORTING
    **      i_structure_name = 'KNB1'
    **      i_grid_title     = 'Cell Styles'
    **      is_layout_lvc    = gs_layout
    **      i_save           = 'A'
    **      is_variant       = gs_variant
    **    TABLES
    **      t_outtab         = gt_outtab
    **    EXCEPTIONS
    **      program_error    = 1
    **      OTHERS           = 2.
    **  IF sy-subrc = 0.
    **  ENDIF.
      PERFORM fill_outtab2.
    **  PERFORM fill_fieldcatalog_2.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
        EXPORTING
          i_structure_name = 'LVC_S_STYL'
          i_grid_title     = 'Cell Styles'
          is_layout_lvc    = gs_layout
          i_save           = 'A'
          is_variant       = gs_variant
    *      IT_FIELDCAT_LVC  = gt_fcat
        TABLES
          t_outtab         = gt_outtab2
        EXCEPTIONS
          program_error    = 1
          OTHERS           = 2.
      IF sy-subrc = 0.
      ENDIF.
    END-OF-SELECTION.
    *& Form SET_LAYOUT_AND_VARIANT
    FORM set_layout_and_variant .
      CLEAR: gs_layout,
      gs_variant.
      gs_layout-cwidth_opt = abap_true.
      gs_layout-stylefname = 'CELLTAB'.
      gs_variant-report = syst-repid.
      gs_variant-handle = 'STYL'.
    ENDFORM. " SET_LAYOUT_AND_VARIANT
    *&      Form  set_cell_style
    *       text
    FORM set_cell_style .
    * define local data
      CONSTANTS:
      lc_style_bold TYPE int4 VALUE '00000121',
      lc_style_red TYPE int4 VALUE '00000087',
      lc_style_cursive TYPE int4 VALUE '00008700',
      lc_style_underline_faint TYPE int4 VALUE '00008787',
      lc_style_underline TYPE int4 VALUE '00008707',
      lc_style_underline_red TYPE int4 VALUE '00008007'.
      DATA:
      ls_outtab TYPE ty_s_outtab,
      ls_style TYPE lvc_s_styl,
      lt_celltab TYPE lvc_t_styl.
      CLEAR: ls_style.
      ls_style-fieldname = 'BUKRS'.
      ls_style-style = '00000011'.    " make contents invisible
      INSERT ls_style INTO TABLE lt_celltab.
    **  CLEAR: ls_style.
    **  ls_style-fieldname = 'BUKRS'.
    **  ls_style-style = lc_style_bold.
    **  INSERT ls_style INTO TABLE lt_celltab.
    **  CLEAR: ls_style.
    **  ls_style-fieldname = 'KUNNR'.
    **  ls_style-style = lc_style_red.
    **  INSERT ls_style INTO TABLE lt_celltab.
    **  CLEAR: ls_style.
    **  ls_style-fieldname = 'ERDAT'.
    **  ls_style-style = lc_style_cursive.
    **  INSERT ls_style INTO TABLE lt_celltab.
    **  CLEAR: ls_style.
    **  ls_style-fieldname = 'ERNAM'.
    **  ls_style-style = lc_style_underline.
    **  INSERT ls_style INTO TABLE lt_celltab.
      ls_outtab-celltab = lt_celltab.
      MODIFY gt_outtab FROM ls_outtab
      TRANSPORTING celltab
      WHERE ( bukrs = '1000' ).
    ENDFORM. " SET_CELL_STYLE
    *&      Form  FILL_OUTTAB2
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM fill_outtab2 .
    * define local data
      DATA: ls_outtab2  TYPE ty_s_outtab2,
            ld_num8(8)  TYPE n,
            ld_idx      TYPE i,
            ld_fname    TYPE fieldname,
            ld_perc     TYPE i,
            ld_text(50) TYPE c.
      DATA:
      ls_style TYPE lvc_s_styl,
      lt_celltab TYPE lvc_t_styl.
      FIELD-SYMBOLS: <ld_style>  TYPE lvc_style.
      ld_num8 = 0.
      DO p_rows TIMES.
        WRITE syst-index TO ld_text NO-ZERO.
        CONDENSE ld_text NO-GAPS.
        ld_perc = ( syst-index * 100 ) / p_rows.
        CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
          EXPORTING
            percentage = ld_perc
            text       = ld_text.
        CLEAR: ls_style,
           ls_outtab2.
        REFRESH: lt_celltab.
        ls_outtab2-maxlen = syst-index.
        MOVE ld_num8 TO ls_outtab2-style.
        ls_style-style = ls_outtab2-style.
        INSERT ls_style INTO TABLE lt_celltab.
        ls_outtab2-celltab = lt_celltab.
        APPEND ls_outtab2 TO gt_outtab2.
        ADD 1 TO ld_num8.
      ENDDO.
      BREAK-POINT.
      CONSTANTS :
          c_bold(4)           TYPE x       VALUE '00000020',
          c_red(4)            TYPE x       VALUE '00000017'.
      CLEAR: ls_outtab2.
      REFRESH: lt_celltab.
      ls_outtab2-maxlen = 0.
      ls_outtab2-style  = c_bold.
      ls_outtab2-style2 = c_red.
      ls_style-style = c_bold + c_red.
      INSERT ls_style INTO TABLE lt_celltab.
      ls_outtab2-celltab = lt_celltab.
      INSERT ls_outtab2 INTO gt_outtab2 INDEX 1.
    ENDFORM.                    " FILL_OUTTAB2
    *&      Form  FILL_FIELDCATALOG_2
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM fill_fieldcatalog_2 .
    * define local data
      DATA: ls_fcat TYPE lvc_s_fcat,
            lt_fcat TYPE lvc_t_fcat.
      DATA: ld_fname  TYPE fieldname.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
    *     I_BUFFER_ACTIVE              =
          i_structure_name             = 'LVC_S_STYL'
    *     I_CLIENT_NEVER_DISPLAY       = 'X'
    *     I_BYPASSING_BUFFER           =
    *     I_INTERNAL_TABNAME           =
        CHANGING
          ct_fieldcat                  = lt_fcat
        EXCEPTIONS
          inconsistent_interface       = 1
          program_error                = 2
          OTHERS                       = 3.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      DELETE lt_fcat WHERE ( fieldname NE 'STYLE' ).
      READ TABLE lt_fcat INTO ls_fcat INDEX 1.
      DO 16 TIMES.
        ls_fcat-fieldname = 'STYLE'.
        ls_fcat-col_pos = syst-index.
        WRITE syst-index TO ld_fname NO-ZERO.
        CONDENSE ld_fname NO-GAPS.
        CONCATENATE ls_fcat-fieldname ld_fname INTO ls_fcat-fieldname.
        APPEND ls_fcat TO gt_fcat.
      ENDDO.
    ENDFORM.                    " FILL_FIELDCATALOG_2
    Regards
      Uwe

  • JTextArea selection color

    Hi
    I want to be abel to set diffrent colors in a textarea by selecting a
    interval of text och and then selecting a color.
    How is this done?
    I dont mean the selection color, the actual text. The purpose is to have an textarea with lots of news text, and be abel to color mark them for diffrent priority.
    Thanks.

    hi,
    JTextField, JPasswordField, and JTextArea each use a PlainDocument model. PlainDocument allows one font, one color, and is limited to character content. JEditorPane and JTextPane use a StyledDocument model. StyledDocument is much more complex, allowing multiple fonts, colors, embedded images and components, and various sets of hierarchically resolving textual attributes. So either use JEditorPane or JTextPane as per u'r requirement -
    -manoj

Maybe you are looking for