JCheckBox - how to change colour of content

I have a JTable which has a JCheckBox in the first column. In certain cases I want this checkbox to be disabled. I am using a custom renderer (extends JCheckBox implements TableCellRenderer) in which I can set the background and foreground colours - but this doesn't allow me to set the colour of the area in the checkbox where the tick appears (i.e. to make the checkbox appear disabled).
I am overriding isCellEditable() in a custom table model which correctly disallows editing of the checkboxes I want disabled.
Does anyone know how to set the colour of the central area of a JCheckBox ?

Since you are already using a custom renderer: Why don' you try
public Component getTableCellRendererComponent(JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column) {
/* change this to whatever condition you have... */
if (row == 1 && column ==2) {
setEnabled(false);
else {
setEnabled(true);
This will get you the default look and feel of disabled checkbuttons.
Otherwise, if you really want a different look for the checkbox, you have to ovverride the correspondig paint method for checkboxes.

Similar Messages

  • How to change table of content font in captivate 6

    Hi There,
    Can somebody please suggest me how to change table of Content Text font English to Arabic in Captivate 6 and which font supports Arabic language.
    Please refer below image, highlighted text font should be changed.
    Looking forward for help.
    Thanks,
    Srikanth

    The weird sliding navigation is Apples pride and joy!
    That TOC allows you to slide between chapters, sections and pages.
    iBooks Authjor was designed to do what it does and what Apple wanted it to do.
    Some things can be changed during the books production,  but the " weird navigation"  is not something you can change to do what you want.
    iBooks Author is does not produce ePubs.. at least not as "ePub" is known from Pages, inDesign etc,.
    If you want what is available in ePubs.. then iBooks Author is not the application to produce it.
    You could drag a section page above chapter on and create an index type page using book marks for links - but whats the point? 
    People using iPads and familiar with iBooksAuthors special way of book presentation.. are quite happy its so easy to use.

  • How to change "Select a content category " text

    Hi folks,
    I really appreciate the support community, as I did deeper and deeper into the produce I've seen the same handful of names pop up across the board! Thanks for all your help!
    I was wondering how to change the "Select a content category>>" text that displays in a traditional skin next to your content categories upon generation. Specifically this:
    Is there a way to edit the text? Mine are focused on government levels and I'd like to make it easier for users.
    Thanks! Happy New Year!

    Hi there
    I believe you do it as follows:
    Click File > Project Settings.
    Ensure the General tab has focus.
    Click the Advanced... button.
    Click the LNG File tab.
    Scroll the list to the [WebHelp] section.
    Locate the item that reads: ContentCategoryList=Select a content category.
    Click on it to select it.
    Click the Edit button.
    Change the text following the equals sign it to what you want it to read.
    ContentCategoryList=Change this text
    Press Enter to accept the change.
    Click OK to dismiss the dialogs.
    Generate and test!
    Hope this helps... Rick

  • How to change colour settings on Satellite Pro P300

    I just got my new laptop and can't for the life of me find how to change the colour settings in the monitor.
    On my old desktop there was a button on the monitor.
    Being a first time laptop user im going nuts trying to find how to change my monitor settings...
    If anyone can help id be so grateful

    Please dont mix the notebooks internal monitor with the external desktop PC monitor.
    You will not find any control unit like on the external monitor which would help you to change the color.
    I dont know what graphic chip your notebook uses but my notebook supports Intel graphic card and the preinstalled Intel graphic media accelerator (in control panel) provides some settings for color correction;
    The settings are; color, gamma, brightness and contrast
    There you can set the values between 0 and 100
    Maybe this is what you are looking for

  • How to change colour of mailbox containing new mail

    I have Thunderbird sort my incoming mail into various mailboxes based on various criteria.
    Until recently, when new mail arrived in any box, the title of that box (in the list, left hand pane) turned red - thus making it easy for me to identify which boxes needed my attention. For some reason this has stopped. The incremental number showing the number of unread messages still changes, but the title colour remains black.
    Anyone know how to change the behaviour to highlight mailboxes containing new mail please?
    Thanks..

    My point is that until recently the behaviour was automatic - it changed the colour of box names as amatter of course. This has now changed, wth all box names being in black whether or not there is new mail in the box.
    I receive a lot of mail and being able to quickly distinguish which box had received new mail would make life easier..
    I suspect there is a setting within Thunderbird to enable this but I'm damned if I can find it..

  • How to change colour of the Cell in a table

    Hi,
    Could you please let me know how to change the coluor of the cell at table.
    here i m having a column called "STATUS". i m getting data from backend and filling this column with two values(success/failed).
    when i get success, the cell should be in green color, when it is failed cell color should be red.
    i followd below:
    created a context attribute "color" of type
    com.sap.ide.webdynpro.uielementdefinitions.TableCellDesign
    i binded this with the column proerty "cellDesign".
    when i executed bapi i sohlud get different colors according to output.
    here is my execute function
    wdContext.currentZemp_Compare_InputElement().modelObject().execute();
                wdContext.currentUploadElement().setStatus(wdContext.currentMessageElement().getSuccess());
                if(wdContext.currentMessageElement().getSuccess().length()>6)
                wdContext.currentContextElement().setColor(WDTableCellDesign.GOODVALUE_LIGHT);
             else
               wdContext.currentContextElement().setColor(WDTableCellDesign.BADVALUE_LIGHT);
    but when i get value failed it filling red for all other cells in that column
    when i get value success, cells all r filling with green.
    how can i get only perticual cell colur should b green/red.
    plz try to solve this problem.
    wer i need to do changes?
    thanks in advance
    venkat

    Hi,
    For your scenario, you need to have two cellVariant as TableStandardCell (say successTSC & failTSC). Add tableCellEditors to these 2 TableStandardCell as you like. Mark there variantKey property as var1 & var2 respectively.
    Do change the cellDesign as you like the color for the TableStandardCell.
    Bind an attribute selectedVariant to your column selectedCellVariant property.
    Now in wdDoModify you can write:
    for(int i=0;i<wdContext.nodeCountries().size();i++){
    if(wdContext.nodeCountries().getCountriesElementAt(i).getStatus().equals("SUCC")){
    // Here node countries is the datasource of your table.
    wdContext.nodeCountries().getCountriesElementAt(i).setVariantKey("var1");
    } else if(wdContext.nodeCountries().getCountriesElementAt(i).getStatus().equals("FAIL")){
    wdContext.nodeCountries().getCountriesElementAt(i).setVariantKey("var2");
    The article below will definetly help you in your requirement.
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c0310fd2-f40d-2a10-b288-bcbe0810a961]
    Hope this will surely solve your problem.
    thanks & regards,
    Manoj

  • How to change colours of the document?

    Hi,
    I am working on a form that was build from Microsoft Doc and then scanned onto Acrobat Pro to create the form fields etc.
    Mananagement just told me that they did not like the colour of the document and want it changed to another colour. (from Blue to Green).
    Is there a way where I could 'edit' the colour change using Acrobat Pro ? 
    Unfortunately, I do not have Photoshop nor do I know how to use it.... 
    your help is much appreciated!

    Believe it or not  since the form was created from a scan (a Picture) its uneditiable
    Your going to have to go back into word recreate the document as a document
    Save as an adobe quality PDF from print menu (print menu > Hold PDF button down > Choose Adobe PDF or Adobe quality PDF.)
    Save the original.
    Open Acrobat and add the  Fillout fields. Leave background White.
    go to OfficeMax,Office Depot, Staples, or any office suppy and a couple of packs of the proper color blue paper
    Load up colored paper in Printer and print the PDF.
    It will save you a lot of head ache's
    If its to be filled out by hand You don't even need Acrobat.
    just create the form use a series of Tabs and format the tabs with solid leaders (Format Menu Tabs)
    Type one space after the last word before a tab that is to be a field
    Format that tab for a solid leader.  example "________"
    Fields that go to right edge of paper you shoul use it and set it to 7.5" if your using lettersized paper.
    If you need checkboxes make sure in Word 2011 click developer Tab and you can insert click boxes
    When finished save Document.
    Then save as a PDF.
    In acrobat follow first set of directions. except you can make the check box clickable field when clicked on with insert a chck or an x.
    Hope this helps

  • How to change  panel's content ??

    hi
    i just tried to remove the older contents and repaint the panel then add the new contents ,but this try didnt work.
    what do you think?
    how can i change the contents?

    After you add or remove components from a panel you need to revalidate() the panel.
    Or, maybe a Card Layout is a better approach:
    http://java.sun.com/docs/books/tutorial/uiswing/layout/visual.html

  • How to change the Button content as CamelCasing in Windows phone 8.1 Message dialog

    This was already raised in
    Stack over flow, While showing the native Message dialog in Windows phone, i cant change the captions as camel case of command buttons. Is this a bug with windows phone 8.1(WinRT) are is there any workaround to fix this issue?
    Sankar

    This isn't recommended and violates the system style.
    If you want a custom dialog you need to use a different control. The MessageDialog always lower cases the buttons to match the system style and is not generally customizable.
    If you use a ContentDialog you can customize it fairly extensively, and it doesn't try to fix the case of its buttons. You'll probably want to create your own ContentDialog class (there's a template under Add.New Item...) with your desired contents, but here's
    a quick content-free example:
    ContentDialog cd = new ContentDialog();
    cd.Title = "My Title";
    cd.PrimaryButtonText = "CoNtInUe";
    cd.SecondaryButtonText = "sToP";
    await cd.ShowAsync();
    Also note that the guidelines
    for message dialogs suggest using clear and specific verbs rather than generic OK/Cancel.

  • How to change property file contents during run time?

    Hi everyone. First post so go easy on me please.
    I have a couple of properties that I want to read from a from a file. To achieve this I simply use:
    ResourceBundle.getBundle("my.package.MyItems").getString("MyProperty");
    This works like a wonder. The problem is, i want to change the property "MyProperty" during runtime. I've found the properties file (MyItems.properties) inside weblogic, but if a change its contents it does not reflect in the application.
    I can come up with a couple of justifications:
    * I'm not looking in the right folder/changing the wrong file in the server;
    * Weblogic caches the properties file, meaning that I have to redeploy the project (defeating the purpose of actually having a properties file).
    Can anyone help with this one?
    [EDIT] Forgot important info:
    * JDeveloper 11.1.1.4
    * Weblogic 11.3 (not 100% sure)
    * Both JDev and WebLogic running on Windows 7 64 bits
    Thank you in advance!
    Best Regards
    J. Peixoto
    Edited by: 868634 on Jul 12, 2011 9:37 AM
    Edited by: 868634 on Jul 12, 2011 10:21 AM
    JDeveloper 11.1.1.4, not 3

    I tried it all.
    Just an explanation of my context.
    I have 1 application with 2 projects in it. First project is called "CommonUI_ViewController" and the second one "FO_ViewController".
    The properties file I'm trying to change is located inside "CommonUI_ViewController", in package "PropertiesConfig" and the file is called "PhaseListener.properties".
    "FO_ViewController" is dependent on "CommonUI_ViewController". When I run "FO_ViewController" the integrated weblogic server log shows this (among other things):
    [10:25:55 AM] Wrote Web Application Module to D:\JDeveloper\dump\system11.1.1.4.37.59.23\o.j2ee\drs\SPV_BPM\FO_ViewControllerWebApp.war
    [10:25:57 AM] Wrote Web Application Module to D:\JDeveloper\dump\system11.1.1.4.37.59.23\o.j2ee\drs\SPV_BPM\CommonUI_ViewControllerWebApp.war
    Note: both lines above point to folders. "FO_ViewControllerWebApp.war" and "CommonUI_ViewControllerWebApp.war" are NOT war files, but folders that have that name.
    I tried changing the properties file in the following locations:
    * D:\JDeveloper\dump\system11.1.1.4.37.59.23\o.j2ee\drs\SPV_BPM\FO_ViewControllerWebApp.war\WEB-INF\lib\adflibSPVCommonUI.jar > PropertiesConfig\PhaseListener.properties;
    * D:\JDeveloper\dump\system11.1.1.4.37.59.23\o.j2ee\drs\SPV_BPM\CommonUI_ViewControllerWebApp.war\WEB-INF\lib\adflibSPVCommonUI.jar > PropertiesConfig\PhaseListener.properties;
    * D:\JDeveloper\dump\system11.1.1.4.37.59.23\o.j2ee\drs\SPV_BPM\CommonUI_ViewControllerWebApp.war\WEB-INF\classes\PropertiesConfig\PhaseListener.properties (no need to open any jar/war to get to this one).
    I changed all these files with different values but no change was shown in the application (using the method in the previous post).
    I believe that I'm still doing something wrong :/
    Thank you for your help so far vinod_t_krishnan!
    J. Peixoto

  • How to change colour of an particular text inside uitextview

    when i change the colour of particular texts,i found the above sentence missing and the words i want to change is also missing in textview.
    for eg. There is a stanza and to describe that there is a word "more"at the last of the sentence,when i change the colour i found sentence missing along with that word to be changed. Please help me in solving this..

    rjjfindlay,
    The PDF document may contain raster artwork or vector artwork or a combination of the two. Illy is basically working with the latter. If you select the (different parts of) artwork, you may see which kind(s) in the Layers palette/panel.
    If you report back your findings here, you will help the helpers help you.

  • How to change "Display column content" on a uploaded file link?

    Hi,
    I based my portal form on a table with a field of type BLOB. I used this to upload any type of file. I have no problem in uploading my file, when I query the information, a link comes up with the words "Display column content". I can click on that link to see the content of my file. But is there a way to change the wording "Display column content"?
    null

    Yoy can change the link by editing the generated package

  • How to change default 'ERROR: Content not available' error message?

    Does anyone know where this string can be replaced? Is it located in a properties file somewhere or is it hardcoded into the Desktop servlet?
    -thanks
    -matt

    Depending upon the container you use all strings are available under:
    /opt/SUNWps/web-apps/https-yoda.isdintegration.com/portal/WEB-INF/classes
    HTH

  • How to change BI Content InfoObject (move Lowercase letter mark) and transp

    Hello,
    1. Do you know how to change the business content infoObject by moving the mark "lowercase letter" for the characteristic (no master data) so that i can transport it in PROD.
    When i tried to change it, the message i recieve is, that i have to delete the SID table. And when i want to delete the SID table, i reciéve the message that, the table content data, and that the data in the table have first to be deleted. And also, i cannot delete data in the SID table.
    Actually, and by trying to resolve the problem, i see that the infoObject is NOW on "REVISED",....
    2. Normally, i have to change the infoObject by removing the "lowercase letter Mark", so that by the activation, it can be transferred to a transport order i created in Solution manager PROD. But the infopackage and transformation and datasource i created before did not, give a posssibility to save this in the transport order.
    3. How can i change the activated Business Content infoObject (now on REVISED) and transfer it to the transport order i created in Solution manager Prod. For example, i created a logical system in SPRO and could transfer it to the transport order, but in RSA1, by creating the objects, no dialog to transfer the Z-Bi created objects in transport ORDER is displayed.
    My most important problem here is the change for the INFOOBJECT, save the change in transport order, and transport it in productiv.
    4. One more question, is to know what happen with old request data in PROD infocube, after i transport the change infoObject in PROD?
    Do you know how to resolve the problem?
    Kind regards and many thank for helping
    Arnaud

    Hi,
    Did you try Delete Master Data on the right click of your Infoobject? Since your infoobject is already loaded with data, it does not allow you to change the definition. You need to delete data completely from the infoobject and change the lower case letter.
    You can only transport the Active version but not revised version.
    Try deleting tables in SE14 t-code.
    Regards,
    Suman

  • Changing the EMail content for a message either failure or success

    Hi All,
    I  need some information about how to change the Email content which was sent by the system which was triggered during process chain. we want to get  the subject of the message rather than all the details which are part of default messages like
    Log for This Process:
    Log of Respective Background Job:
    and others.
    Since we are trying to send the message to Cell Phones  , just need a short message either sucess or failure.
    Is there any exit or methid to override this message to a custom message.
    Any help in this regard is appriciated.
    Thanks on advance.
    sree

    Hi,
    I know its a very old post, but I'm facing this issue now.. It would be great if you guide me.
    I'm getting the following error
    "Message handle error.
    error while attempting to process the message "com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessage"; the reported exception is: Transaction Rolledback.: weblogic.transaction.internal.TimedOutException: Transaction timed out after 303 seconds
    BEA1-01502373650AE964512F
    Thanks,
    Girish.

Maybe you are looking for