Is it possible to set a different color to part of a cell?

Hi all,
I am have trouble setting cell-specific Renderer.
I have followed the instructions in the UISwing tutorial
and extended JTable definition to overload getCellRenderer()
to return myRenderer
final JTable tableView = new JTable(dataModel){
public TableCellRenderer getCellRenderer(int row, int column) {
TableCellRenderer colorRenderer = new ColorRenderer();
return(colorRenderer);
My class definition for ColorRenderer is as follows:
class ColorRenderer extends JLabel implements TableCellRenderer {
public ColorRenderer() {
public Component getTableCellRendererComponent(
JTable table, Object color,
boolean isSelected, boolean hasFocus,
int row, int column) {
setForeground(Color.blue);
return this;
Is it possible to set a different color to part of a cell?
eg. I have "TEST,CELL,COLOR" as a string in a cell.
Can I set a different color to the substring "CELL"?
Your suggestions will be accepted most gratefully!
Thanks in advance
-Kalpana

You should inherit your table cell renderer from a container, for example JPanel, add different JLabels to the panel and color them separately.
Kurta

Similar Messages

  • Is it possible to put two different colors in tree parent node background and child nodes background?

    Is it possible to put two different colors in tree parent
    node background and child nodes background?
    Any help will be very helpful.
    Thanks

    Hi PanosE,
    Yes, you can set up another Standard Edition Server in child domain and then deploy pool pairing.
    You need to deploy a new Front End Pool for the new Standard Edition Server.
    A similar case for your reference.
    https://social.technet.microsoft.com/Forums/office/en-US/eca4299c-8edb-481e-b328-c7deba2a79ba/lync-2013-standard-edition-lync-fe-pools-in-multiple-domain-single-forest-senario?forum=lyncdeploy
    Best regards,
    Eric
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Hi I have two questions. I am using NAS 4.1 and was wondering is it possible to set a different session timeout for different users? How is the session timeout set? Thanks, YS

     

    <i>I am using NAS 4.1 and was wondering is it possible to set a different session timeout for different users?</i>
    Um, there is no such thing as NAS4.1.
    I'm assuming that you mean NAS4.0 (maybe NAS4.0sp1?). If so, then the session timeouts are specified in the session section of the NTV configuration files.
    AFAIK, you can specify session timeouts on a per user basis.

  • Is it possible to set a different privacy time for email?

    Hi
    I want to be able to get push notifications for my work emails from 8am - 5pm only. but they continue to push through after 5pm.
    I have set up my personal gmail account with the gmail app.
    My work email is on an exchange server, so any ideas out there to achieve this?
    Thanks,

    <i>I am using NAS 4.1 and was wondering is it possible to set a different session timeout for different users?</i>
    Um, there is no such thing as NAS4.1.
    I'm assuming that you mean NAS4.0 (maybe NAS4.0sp1?). If so, then the session timeouts are specified in the session section of the NTV configuration files.
    AFAIK, you can specify session timeouts on a per user basis.

  • How can i set the different colors for a different group ui elements

    Hi All,
                  I Created a View Container in that i crated 2 views. In first view i created a group and in second
    view also i created a group. I want to set The First view group header colour as Golden colour and for second view group heder colour as Green colour. Please any one help me on this.
    Thanks&Regards,
    Bhargava.

    Dear GLM,
                         i got that. while creating the theme, in Complex Elements select the group element and  set the primary group header colour to golden and secondary group Header colour to Green and in ur webdynpro application set the Group Design property as Primary Color for which group u want to set the Golden color and set the Group Design property as Secondary Color for which group u want to set the Green color.
    Thanks&Regards,
    Bhargava.

  • Saving "Waveform graph" with cursors, set of different colors, in an image file

    Hello:
    I'm trying to save to a file, a waveform of a "waveform graph" that has cursors, which have different colors. When opening the file I can see that the waves are plotted defined color, but the grids and cursors are colored black.
    Someone can tell me what to do, so that the file is saved with the original colors of the "waveform graph"?
    Best Regards

    Probably this is happening because you are using the Invoke node Image Export, which captures an image with less information. However, if your application allows, using the Invoke Node Get Image, which captures your control, displays all the colors of your waveform, include cursors and grids colors.
    In this link bellow, you can see how use this Invoke Node:
    http://digital.ni.com/public.nsf/allkb/5AE4ADCBB65A6D8F86256FBF007A1AC1?OpenDocument
    I hope this helped you. Success in your application.
    Regards.
    Wesley Rocha
    Applications Engineer
    National Instruments Brazil
    www.ni.com/suporte
    Wesley Rocha
    Application Engineer
    National Instruments Brazil
    Visite a nossa comunidade em PORTUGUÊS!!!

  • TabNavigator, different colored tabs?

    Is it possible to set a different color (tab color and
    matching background) for each tab in a tab navigator?
    Thanks!

    quote:
    Originally posted by:
    ntsiii
    One this I see is that you shuld have:
    AppTabs.selectedIndex = openDeals.length - 1;
    since selectedIndex is zero based.
    Tracy
    The reason I'm using openDeals.length is because the static
    tab takes up index 0 so I need to start at 1 for my new tabs. That
    was purposeful. I'll try the creationPolicy and see what
    happens.

  • How can i set up different ring tones for email accounts?

    Hello all,
    I have about 6 different email accounts on my iPhone.  From exchange server (work email) to my personal yahoo and google accounts plus my personal business account.  Is there a possibility to set up different ringtones for each of the emails separately? 
    I monitor my email very closely as I work for a 24-7 emergency call center and I would like to have a way to differentiate my emails by the rintone assigned to them.  My work email goes off all the time, but i can't tell which is which and I hate picking up my phone or stopping what i'm doing for just a junk email.
    Also would there also be an option for high priority emails to have a different ringtone as well?
    thank you so much for any info on this as this has been driving me crazy.

    " Is there a possibility to set up different ringtones for each of the emails separately? "
    No.  Maybe with ios 6 this fall.
    "Also would there also be an option for high priority emails to have a different ringtone as well?"
    No.  Maybe with ios 6 this fall.

  • How can i set up different rings/tones for incoming emails for different email accounts?

    HI, I would like to be able to hear different rings/tones for emails coming from different email accounts. Eg, One sound for incoming email from gmail and another sound for incoming e-mail from Yahoo.
    Thanks!

    " Is there a possibility to set up different ringtones for each of the emails separately? "
    No.  Maybe with ios 6 this fall.
    "Also would there also be an option for high priority emails to have a different ringtone as well?"
    No.  Maybe with ios 6 this fall.

  • Is it possible to set the cell height in a cell style?

    In the attached screenshot, the cell height is set to exactly 0.125. I put my cursor in the cell, then opened the cell styles panel and created a new cell style based on this cell. But when I apply the cell style to other cells, it does not apply the cell height. There were no overrides or other styles applied to the other cells. I also opened up the cell style definition from the cell styles panel, but don't see anywhere to set the cell height there either. Is there another way to do this that I am missing?

    It is possible - and it's fairly simple.
    To set the row height as part of the cell style, all you have to do is use the cell inset above and below. As long as you set the style as 'At least' then this works perfectly well for having predefined cell styles.
    I have been using this successfully for large financial documents for some time without any hitches. For example I use it to get separation between sections within the tables by having a style with extra space above, and similarly for totals rows at the bottom of the table. It can of course also apply different stroke styles at the same time. Having the style set as 'At Least' also allows for multiple line entries to still have the correct spacing above and below.
    So if you spend a bit of time calculating required heights and setting up your styles, then apply a keyboard shortcut to each style, you can then save a whole lot of time when formatting the document.
    I've just finished nearly 400 pages of financials using this method over the past couple of days!
    This solution may not suit your sitation, but if you have a lot of tables to get through it's got to be worth giving it a try.

  • PWA 2010 timesheet: 2 different colors for the rows "Actual " and "Planned

    Hello,
    To make timesheet easier to read and fill, is it possible to have 2 different colors for the rows “Actual “ and “Planned”?
    Thanks,
    soudha

    Hello Soudha,
    By default the timesheet grid shows the cells in white color. But if you have little coding skills or a developer at your end, you can try this using "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\JsGrid.js" java
    script file.
    You may have to modify it but I recommend to take a backup of the file and test in your test environment first.
    Happy troubleshooting.....
    Vikram Daruru - MSFT

  • Is there a way to change the color of the Bezier Curves and points to a different color other than black  I find it perplexing while setting points and curves working on a photo that needs to be separated from it's background for placement on transparent

    Is there a way to change the color of the Bezier Curves and points to a different color other than black  I find it perplexing while setting points and curves working on a photo that needs to be separated from it's background for placement on transparent backgrounds. Any thoughts?

    Yes. Well, sort of: instead of a "path", set the pen tool to "shape" in the tool properties. Then set the fill colour to transparent, and the stroke colour to the colour you want. You can also set the stroke width.
    Not perfect, but at least you can see the path more clearly - the anchor points and handles still remain the default colour. Open the path panel, and right-mouse click the path shape to create a selection based on that shape. The Paths panel menu also allows you to create work paths based on that shape.
    Unfortunately when you try to move the handles the black thin outline appears again until you release the mouse button.
    This is one of several things that works better in Photoline: in Photoline, once the path is set to a specific colour, editing the path uses the actual colour and stroke width. which is extremely handy for creating path based selection with awkward background colours and/or a high resolution screen. In Photoline the handles and bezier points are also much, much larger, which makes it rather simpler to work with as well - especially on a higher resolution screen. And when selected the handles and points are a clear red with a black outline - again easier to spot and identify. I just works better, in my opinion.

  • Is it possible to create a PDF with different colors for screen and printing?

    I'm working on a document that features light colored text on a dark background. I'll be sending this document as a PDF to someone who will likely want to print it. Is it possible to set up the document such that it will display this way when viewed on screen, but will print as black text on a white background, without requiring any special action on the part of the recipient?
    Printing a color separation of just the text color produces exactly the results I'm after, but I can't ask the recipient to do that. I need it to happen automatically any time it's printed.
    I've tried setting up a duplicate text layer in black and placing it under the background layer, then setting the background layer and colored text to 'never print'. This works within Acrobat Pro, but not when I print the same document from Preview.
    Is there an acrobat equivalent of a CSS print stylesheet?
    Thanks.

    Create the document in layers with the background on a seperate layer than the text. Export the PDF with"Create Acrobat Layers" selected (it will need to be at least version 1.5).
    Open the PDF in Acrobat, choose the background layer then Options>Properties>Initial State and under "print" choose "Never prints".

  • How to set different color for items in selectManyCheckbox

    hi,
    I would like to change item text background color for each item on selectManyCheckbox (different for each item).
    It is only 5 items so that could be static reference or select.
    I know only how to change background for all items
    af|selectManyCheckbox::item-text {
        background:orange;
    How to select concrete item text and change color for only them?
    I found similar problem:
    css - Set background color of every individual checkbox of p:selectManyCheckbox - Stack Overflow
    but this dont work for me because I dont have in adf tr structure
    I need somethink like this:
    af|selectManyCheckbox::item-text XXXX - select here one of the item by number on list or id  {
        background:orange;

    hi,
    thanks Alejandro and Federico for answers.
    I use JDev 11.1.1.6. I dont write it in previously post because I think that is a more css then adf problem.
    I have 5 selectItem based on simple List<String> {"text1", "text2", "text3", "text4". "text5"}:
    <af:selectManyCheckbox label="List" id="smc2"
                                               layout="horizontal"
                                               value="#{bean.listInBean}"
                                               autoSubmit="true">
                          <af:selectItem label="text1" value="text1" id="si47"/>
                          <af:selectItem label="text2" value="text2" id="si43"/>
                          <af:selectItem label="text3" value="text3" id="si46"/>
                          <af:selectItem label="text4" value="text4" id="si45"/>
                          <af:selectItem label="text5" value="text5" id="si44"/>
                        </af:selectManyCheckbox>
    and I would like to color first selectItem text to orange, second to red.. etc, The list is a static list. Not would be changed.
    After Alejandro answer I build simple for each element (anyCollection contains item with two fields: textValue and label {(text1,text1), (text2,text2)...}
      <af:forEach items="#{bean.anyCollection}"
                                      var="item">
                            <af:selectItem id="si48" value="#{item.textValue}"  styleClass="yourClassName#{var.index}"
                                           label="#{item.label}"/>
                          </af:forEach>
    And now if I have my var called "item" I can write 5 css style classe yourClassName#{var.index} with different color, but there is a problem:
    Attribute styleClass is not defined for af:selectItem
    If it will be so simple I will just add 5 style classes for each selectItem
    <af:selectItem label="text1" value="text1" id="si47" styleClass="yourClassName0"/>
    <af:selectItem label="text2" value="text2" id="si43" styleClass="yourClassName1"/>
    Should I use other component then adf facer rich?

  • How to set input ready query cell is different color?

    Dear All
      Hi, everyone, hereby i have a IP question.
      i would like to know, how to set the input ready query's cell different color between those cell which is unable to change value one in workbook..?
    Example :
      For my workbook which have a input ready query,
      i have 4 rows for my input ready query report.
      For the first row which is not input ready cell and unable to change any value for the cell, then following rows's cell can be change value,
      so, i would like to make first row's color cell different with following row's cell.
      In additional, all value of cell is initial zero.
      therefore, is there any mehtod to make different color between able cell and unable cell?
    Thanks a million.
    Regards,
    WenLong.

    Cells in the input ready query result have different styles given by SAP. All rows will have one style, column headings will have one style whereas input ready cells will have one style. If you are in Excel 2003, put cursor in the input ready cell, goto format -> style, you can see one BeX style attached to that cell, apply watever color you want for that style, save the workbook. If you do this for one cell, it will be applied to all the input ready cells by default. In the same way you can give different color to the non input ready cell styles. In Excel 2007, Cell styles are available in Home -> Cell styles. Here you can see all Bex related styles.

Maybe you are looking for

  • How do I make a playlist of my podcasts in iOS7??

    I like to listen to podcasts more than music. How can I make a playlist of all my podcast downloads in iOS7? And how can I do a random shuffle of the podcasts that I have not yet listened to? In the old operating system I was able to do this under iT

  • Problems with ö, ü, ä when using download script in apex

    My Problem is that the procedure which is described here http://download.oracle.com/docs/cd/B32472_01/doc/appdev.300/b32469/up_dn_files.htm#CJAHDJDA returns for file nöx.txt -> nöx.txt if i change the coding from UTF8 to "westeuropean (Windows)" the

  • WRT54GL Port Range Forwarding?

    Hi. In Port Range Forwarding there are only 10 lines (konfigurating 10 diff. ports). What if you need to forward more ports than 10? Solved! Go to Solution.

  • Help! Installed CS4 student edition, but only Illustrator appeared!

    Hi! I recently installed the CS4 student edition, but only Illustrator appears in 'Applications.' A lot of the files associated with Photoshop and In Design are on the computer, but not the programs themselves. I wonder if this has to do with the fac

  • How do I re-install an old product?

    My hard drive recently failed and I have lost all data.  How can I re-install my previous purchase of Master Collection CS5.5? I have copies of my serial numbers, but did not register them with Adobe, so there is no record on my account.