How to change row background when the value was changed?

hello expers!!
i need your help...plz help me.
i want my table row(specific) background changes when the user changed the value in a cell. I am able to know that a value in a cell was changed but the problem is i dont know how to change row color background. I've researched over the internet on how to solve this problem but nothing was found.
please see the link to help you visualize what i mean. tnx!
[http://www.flickr.com/photos/28686474@N04/2708299927/]
tnx in advance!! code snippet will be a great help...
Edited by: kagaw3000 on Jul 27, 2008 8:22 PM

final JTable table = new JTable(data, columnNames) {
int lastRowChanged = -1;
@Override
public void tableChanged(TableModelEvent e) {
     super.tableChanged(e);
     lastRowChanged = e.getFirstRow();
     repaint();         
@Override
public Component prepareRenderer(TableCellRenderer renderer,
               int rowIndex, int vColIndex) {
Component c = super.prepareRenderer(renderer, rowIndex, vColIndex);
     if (rowIndex == lastRowChanged) {
          c.setBackground(Color.RED);
     } else { 
          c.setBackground(getBackground());
     return c;        
...........this code will changed background color when data was changed BUT if i changed another data in another row the previous backgound color(RED) will be erase. To make it more clearer, it will only change background color of a row only to one row NOT to multiple rows(that is being edited).

Similar Messages

  • How to Refresh The Page When The Value of selectinputData Changes

    Hi;
    I have a select input date component and I want to refresh the page when the value of selectinputdate changes. What is the way to do it?
    Also what is the way to do the same thing with choosedate component?
    Thank you very much...

    Hi Turhan,
    You may want to read about the Partial Page Refresh (PPR) capabilities in ADF Faces. You can make the selectInputDate's partialSubmit property "true" and then cause the specific components you wish refreshed have their partialTriggers property set to the ID of the selectInputDate.
    Hope this helps,
    John

  • Changing the colour of a text box when the value is zero

    Hello
    I have some code in an expression that changes the fill colour of a text box in a matrix in an SSRS report.
    When the value in the year fields is greater than zero then fine it changes the colour to what I want it to be but when the value is zero then the colour just stays white.
    I'm not testing the value in the year fields but in the Tier field. It seems to default to no colour when the year fields are 0 though.
    The code I am using is as follows
    =switch(Fields!TIER.Value=1,"PaleGreen",Fields!TIER.Value=2,"Cyan",Fields!TIER.Value=3,"Beige")
    This code is in the year field textbox fill property.
    I have loaded a screenshot to show an example showing what is happening in the matrix.
    Thanks for any help on this
    Regards
    John

    Hi John,
    According to your description, you want to change the background color of a textbox when its value is greater than zero. If in this scenario, we can use the expression below to control the BackgroundColor property of the textbox:
    =iif(Fields!SalesAmount.Value>0,"Yellow","White")
    If there are any misunderstanding, please elaborate the issue for further investigation.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Previously I had my account set up so both my daughter and I got a text notification when the bill was due. I made changes in our plan and now we no longer receive alerts that the payment is due. How can I get this back?

    Previously my account was set up so my daughter and I got texts when the bill was due. I recently made some changes in our plan and now this is gone. How do I get this back?

    Sorry, without knowing the Apple ID/Password that was originally used to activate this phone, then there is no way to re-activate it, as you've found out.
    Apple can't/won't help you. Your choice is to get this info, or you simply won't be able to re-activate this phone.
    If you ex won't give it to you, then consult a lawyer.

  • How to focus a row directly when the search found the result....in active w

    how to focus a row directly when the search found the result....in active widget

    Considering that I don't understand what you're talking about - does altering the selection of the widget and requesting the focus help?

  • How can I purchase items for app when the app was loaded on another ID before? I has to Chang my AppleID and also transferred an app to new phone. I can't purchase items for app because it wants me to buy the app through new ID. The app was free.

    How can I purchase items for app when the app was loaded on another ID before? I has to Chang my AppleID and also transferred an app to new phone. I can't purchase items for app because it wants me to buy the app through new ID. The app was free.

    All apps (and other content from the store) are tied to the account that downloaded them, whether or not they are free. To do in-app purchases in that app you will either need to log in with the account that downloaded it, or delete it (which will delete its content) and download it with your currently logged in account if you want to do IAPs on that account.

  • Count the number of rows based on the values!!!

    Hi all,
    What I am using:
    I am working with a multidimensional database in Visual Studio 2010 using its Data source view and calculation member and dimension usage.
    What I want to do:
    I have a fact table that has five columns(leg(s),hand(s), Head and body,overall) that shows the category of how severe the injury is. Let say for the records all columns never have an empty value(no injury is stated with 'No injury' ) . These five columns
    are connected with a dimension that has all the available values (Category A-E of injury).The overall has the most severe from the other four columns. I want to create a bar chart with five different measure
    values, one for each column, and count the values in those columns. 
    For example : I have a slicer in the excel and a bar chart and the slicer has all the values of the Category of the injury ( Cat a,Cat B, Cat C, ... Cat E, No injury ) and when i select one of them, lets say
    Cat C,  the bar chart should update and show how many Cat C each measurement column has. 
    Example FACT table:
    ID      LEG      HAND    HEAD   BODY OVERALL
    1        No         A           No        No        A
    2        No        D            C          C         C
    3    E         C            D           A         A
    4         E          E           B            C         B
    So if i selected C the bar chart will count   (Leg = 0, Hand = 1, Head = 1, body = 2 and Overall = 1).
    Any ideas ?
    Thanks for the help and the time :) 

    Hi DBtheoN,
    According to your description, you want to create a chart on excel worksheet to count the rows based on the value, right? If in this case, I am afraid this issue is related to Office forum, I am not the expert of Office, you can post the issue on the corresponding
    forum.
    However, this requirement can be done easily on SQL Server Reporting Services. You can using the expression below to count the rows.
    =COUNT(IIF(Fields!LEG.Value=Parameters!TYPE.Value,1,NOTHING))
    Regards,
    Charlie Liao
    TechNet Community Support

  • How can i copy and referencing the value of a sub-total of a category into another cell?

    How can i copy and referencing the value of a sub-total of a category into another cell?

    Cells in Category  rows 'exist' only when those categories are inserted using the Reorganize table. Those cells cannot be referenced from other cells.
    If you want a category summed, you will need to do that in a cell that is still visible when the table is not sorted into categorie using the Reorganize pane. The function to use is SUMIF. You can find information regarding SUMIF (and SUMIFS) in the iWork Formulas and Functions User Gude. The guide may be downloaded using the link in the Help menu in Numbers '09.
    Regards,
    Barry

  • I want the system automatic update my UDFs when the OnHand was changed.

    I added two UDFs in table OITW to count the warehouse OnHand by CASES and Bottles. I want the system automatic update my UDFs when the OnHand was changed.  Is there any way I can do it in database level instead in the application (too much places involved).

    There is few ways how to do this:
    - triger as David said, but I dont recomend it through SAP policy
    - in stored procedure transaction notification  by adding or updating document update your user field
    - create job in SQL server which in specific interval recalculate the changes of onhand and update your user defined field
    - create addon which will be over functiuonalities which may change the onhand value
    I think that from SAP is possible only Addon, but the easist way is trigger and if you dont need it just in time but for example every 10 seccond, the better is job which cannot fail the standard SBO transaction (triger may and may be unsafe).
    Hope it helps
    Petr

  • How can I get rid of the values shown on x axis

    How can I get rid of the values shown on x axis ?
    The two diagrams are for illustrations .I want the A diagram like values and wanna get rid of 50 150 250 350on x axis
    Mudassar

    In Axis Options, set Interval to 1. Every category group label
    is displayed. If you want to show every other category group label on the x-axis, type 2.
    "If you want to show every other category group label on the x-axis, type 2."
    what does this mean ?
    when you set 1 as per it everything is shown and when you set 2 every other ????
    Any example on this ?
    Mudassar

  • How to block an invoice if the value of a post is zero?

    Hello,
    In the rules of copy we use the field " Pricing type " with the value " C = Copy manual pricing elements and redetermine the others ".
    The order is complete and the price of the post is not equal to zero.
    During the invoicing the system makes a new search for the prices in the tables of conditions.
    If the condition does not exist in the date of invoice the post takes the zero value.
    How to block an invoice if the value of a post is zero?
    There is no incompleteness procedure for the invoice.
    The value of the post is the result of several conditions and we cannot make them obligatory.
    Who already has to meet this problem with the recalcul of the price in the invoicing?
    Best regards
    Frédéric Blaise
    e-Kenz S.A.
    Luxembourg

    Hi,
    It is not the total invoice which is equal to zero but only one post.
    As I explained it at first the problem is the following one:
    In the rules of copy we use the field " Pricing type " with the value " C = Copy manual pricing elements and redetermine the others ".
    he order is complete and the price of the post is not equal to zero.
    +During the invoicing the system makes a new search for the prices in the tables of conditions.
    If the condition does not exist in the date of invoice the post takes the zero value.
    I look for a solution to block the creation of the invoice if a post only is equal to zero after the updating of the prices.
    Thanks
    Frédéric

  • I've lost my iPhone 4... How can I find it when the device is offline when using "find my iPhone app"????? Any way of getting a location from it????

    I've lost my iPhone 4... How can I find it when the device is off linesmen using "find my iPhone app"????? Any way of getting a location from it?????

    No. It must be online in order to locate it.
    What To Do If Your iDevice Is Lost Or Stolen
    iPhone, iPod Touch, and iPad
    If you activated Find My Phone before it was lost or stolen, you can track it only if it is connected to the Internet by Wi-Fi or cellular. What you cannot do is track your device using a serial number or other identifying number. You cannot expect Apple or anyone else to find your device for you. You cannot recover your loss unless you insure your device for such loss. It is not covered by your warranty.
    If your iPhone, iPod, iPod Touch, or iPad is lost or stolen what do you do? There are things you should have done in advance - before you lost it or it was stolen - and some things to do after the fact. Here are some suggestions:
    This link, Re: Help! I misplaced / lost my iPhone 5 today morning in delta Chelsea hotel downtown an I am not able to track it. Please help!, has some good advice regarding your options when your iDevice is lost or stolen.
      1. Reporting a lost or stolen Apple product
      2. Find my lost iPod Touch
      3. AT&T. Sprint, and Verizon can block stolen phones/tablets
      4. What-To-Do-When-Iphone-Is-Stolen
      5. iCloud- Use Lost Mode
      6. What to do if your iOS device is lost or stolen
      7. 6 Ways to Track and Recover Your Lost/Stolen iPhone
      8. Find My iPhone
      9. Report Stolen iPad | Stolen Lost Found Online
    It pays to be proactive by following the advice on using Find My Phone before you lose your device:
      1. Find My iPhone
      2. Setup your iDevice on iCloud
      3. OS X Lion/Mountain Lion- About Find My Mac
      4. How To Set Up Free Find Your iPhone (Even on Unsupported Devices)

  • I have a new computer and my old drive has my UNSAVED bookmarks on it and I want to import them, how do I do it when the bookmarks are not SAVED?

    I have a new computer and my old drive has my UNSAVED bookmarks on it and I want to import them, how do I do it when the bookmarks are not SAVED?

    You can backup the bookmarks on the old computer and create a JSON or HTML backup and restore or import this file in the Bookmarks Manager (Bookmarks > Show All Bookmarks).
    You can use an USB stick to transfer the saved bookmarks file to the new computer.<br />
    You can also copy the places.sqlite file from that computer to have the bookmarks and the history.
    *http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox
    *http://kb.mozillazine.org/Backing_up_and_restoring_bookmarks_-_Firefox

  • How can I generate data when the link is click on?

    i have written a stackoverflow question ,
    would like some input if you have any , thanks, i would like to stay away from using jquery
    http://stackoverflow.com/questions/23143436/how-can-i-generate-data-when-the-link-is-click -on/23143813?noredirect=1#23143813

    I think you need to rephrase your question and be more specific. Also for me the images you are referring to do not exist. From your question I am interpreting it as "how do I program?"

  • How can i find out when the Creative Cloud be available in my country?

    how can i find out when the Creative Cloud be available in my country?

    This information is not available. We are working to add more countries, the newest being South Africa which will be added by the end of November. We are working to make this process more transparent. I understand how frustrating it is to not know if and/or when the Creative Cloud will be available in your country.

Maybe you are looking for

  • How can I get a new tab to open to my homepage, instead of a blank, untitled page?

    When I click on the + to open a new tab, I would like that new tab to open to my homepage, not just to a blank, untitled page. I have looked through the help pages, but have not been able to find any instructions on how to make this happen. Is it pos

  • HP Officejet Pro 8600 Plus Network Issue

    Hi I've had this printer for a long time, and I recently began to use the wireless features such as printing over my network instead of wired printing as a result of having more computers in the house, and the feature works fine, but every time I res

  • Reg:SAP Net weaver CE 7.2 ,Java Server is not starting

    Hiiiii,     This is Ravi , i am new to SAP NW.I have installed the SAP NW CE 7.2 trail Version.The problem is that when i open the SAP Management console,only one process is running out of two processes of process list. i.e.,only igswd.exe  is runnin

  • Problem with Keynote

    Hello, anyone knows about a problem in Keynote(iWork) that whenever I write with a RTL language, and make "Build" in Inspector, it doesn't not show the whole word or sentence, and sometimes it doesn't show the entire sentence. Is this problem solvabl

  • Condition type: DIFF-Rounding Off

    Dear Colleagues, The condition type DIFF-Rounding off is not woring in sales order. Config details as follows. 1. OB90->Respective Company Code, Currency & rounding unit of '5' is being set in this transaction. 2. Define condition type DIFF via Trans