How can i validate an untouched cell and change bground color if error

Hi ,
three questions
1. I can validate data in cells in setValueAt method but the cell data will be validated only if user click on that cell.
how can i validate another cell if user does not even touch it.
2. and if error how can i change background color.
3. i have JTextField for column as cell editor/renderer. To change the data user have to double click on cell. How can I make it to click once to edit the value in the cell.
Thanks in advance for help.

how can i validate another cell if user does not even touch it.
Why would you want to validate a cell if a user doesn't change it?for example user clicked Add row, and i added a row in the table with blank information...so .all cells in the new row have blanks, so if user does not enter the data in the second column... which he did not touch...i want to catch it and produce error
How can I make it to click once to edit the value in the cell.
Something like this:
DefaultCellEditor dce = (DefaultCellEditor)table.getDefaultEditor(Object.class);
dce.setClickCountToStart(3);Thank you..
Read this section from the Swing tutorial on "How to Use Tables" for more information:
http://java.sun.com/docs/books/tutorial/uiswing/components/table.html

Similar Messages

  • How can i add a new user and change user'password with javamail?

    how can i add a new user and change user'password from a mailserver with javamail?
    email:[email protected]

    Well user creation and updation is a system property..U need to go through that part...as it depends on the system you are hosting pout your application...
    if it is linux...u have to use some shell programming\
    bye for now let me know if this guides you or if you need some more stuff.
    bye

  • How can I customize my status bar to change the color?

    Hello:
    How can I customize my status bar to change the color?
    Thanks

    On which phone model? Either way, modifying the notification bar text color usually isn't something you can do with a standard stock phone.

  • How can I validate data after writing and over reboot/powercycle?

    Hi,
    How can I validate data after writes are done? How can I validate data after reboot or powercycle of the machine is done?
    What are the options I should give while running vdbench? When should I use -v, -vq, -vt, -v -j, -vq -j, -vq -jr, -v -jr options?

    Please look for the "Data Validation and Journaling' chapter in the documentation.
    Henk.

  • How can I get a table cell to change color if its below some value

    Hi everyone, I use JDeveloper with JHeadstart and just finished the tutorial using the predefined HR schema. I was wondering how would I go about making the color of a cell to change to red if it falls below 5. So for example if I was to measure the amount of printer cartridges we had in storage, and it falls to below 5, in the table that has the equipment the cell changes color to red?

    You better aks this question on the jdeveloper forum as it is not related to jheadstart.
    Once you know how to do this, this forum can help you woth keeping your page generatable using a custom template.
    See also the chapter on customizing generator output in the jheadstart developers guide.
    Steven davelaar,
    Jheadstart team.

  • How can I force a smooth join and change a shortcut?

    I am from Denmark so pardon me if I misspell something and I work on a Mac so the shortcuts and menus are for Mac, but you are clever people, so you can probably figure out what it will be on a Windows computer
    I was having trouble in Illustrator CS6 joining two points smooth. I read this article ...
    http://blogs.adobe.com/adobeillustrator/2011/06/join.html
    ... about joining in Illustrator CS5 (which seems to be the same in CS6) ... and noticed it says "A Smooth join is possible only when the end-points are smooth" ... now who came up with this asshat rule (pardon my french)??? I used to be able to force a joining to be smooth no matter what kind of points I had, however, not anymore it seems
    This is what I had trouble with:
    Smooth joins
    Step 1.
    As you can see in the image below I have two points both with an arm ... they should qualify as smooth end-points, right?
    Step 2.
    So after moving the two paths together I went ahead and selected the two points with my Direct Selection Tool (the white arrow). Notice how only one arm sticks out all of a sudden (this was actually a clue to why I had trouble in the first place but more on this later).
    Step 3.
    I tried to force the two points to join smoothly by using the cmd+opt+shift+J shortcut to get the Average & Join dialog box up and select Smooth ... to no avail.
    Step 4.
    It stil ends up doing this weird joining (this is after I tried to move the point with my Direct Selection Tool).
    Step 5.
    So I used cmd+Z until I was back to square one and then I discovered if I moved one of the end-points there was another one beneath it. Notice that it is the point that was missing an arm in step 2, when I had selected what I thought was only two points, which should have clued me in.
    Removing the extra point and placing the two smooth end-points on top of each other again made it possible to make the smooth joining, I had tried to do countless times.
    What I wonder about now is the fact that I could get the Average & Join dialog box without having Illustrator complain up a storm about me having selected more than two points? Illustrator used to be very picky about this, which would have made me discover the extra point way sooner.
    Shortcuts
    In the article I also noticed people complaining about the four keys shortcut for the Average & Join dialog box (cmd+opt+shift+J). You can just go ahead and change that in Edit/Keyboard Shortcuts... (cmd+opt+shift+K). Here is how:
    Step 1.
    In the dropdown change Tools to Menu Commands.
    Step 2.
    Go to Other Objects ... there you will find Average & Join. Go ahead and clear the shortcut and press whichever shortcut you wish for. I chose cmd+J, because I wish to use this method more often than Join. After this you get the option to Go To Conflict ... I did that and gave Join the shortcut shift+cmd+J and ended up giving Justify Text Left the shortcut cmd+opt+shift+J ... yeah, I seldom use the shortcut for Justify Text Left anyway.
    Step 3.
    I saved my new custom shortcut set with the name "Adobe Illustrator CS6 Shortcuts" ... that way I can search for the file and take it with me in case I need it on another computer and the name tells me which version it is for.
    That's all from me ... I hope, this helps

    Joanna,
    It seems that Illy (still) moves in (ever new) mysterious ways.
    I was surprised to see that you got away with your French word, but the hat part must have hidden the first part from the nanny filter. The first part by itself would have become asterisks.

  • How can I select rows of cells and merge them vertically into one cell in each column?

    I'm working in CS4 and need to be able to select 2 to 6 rows of cells (with many columns) in a table and then merge the selected cells vertically into one cell in each column. A few cells in the chart will not need to merge so I must select the ones that do. I have almost 100 pages of charts with cells that need merged this way by Tuesday. Please help!
    Top chart example needs to change to the bottom example.
    Header 1
    Header 2
    Header 3
    Header 4
    Header 5
    Header 6
    100
    600
    300
    600
    20000
    120000
    2000
    500
    400
    50000
    10000
    5000
    3000
    200
    700
    67
    122
    600
    900
    100
    2
    7
    123
    1110
    Header 1
    Header 2
    Header 3
    Header 4
    Header 5
    Header 6
    100
    500
    200
    100
    600
    400
    700
    900
    300
    5000
    30000
    2
    600
    10000
    67
    7
    20000
    2000
    122
    123
    120000
    5000
    600
    1110

    SmartCellMerge may help you:
    http://www.indiscripts.com/post/2012/04/improve-the-way-you-merge-cells-in-indesign
    @+
    Marc

  • How can I use java.util.Date and change display format.

    Hello All,
    I want to use java.util.Date in View Context and in Custom Control Context of Web dynpro java. When i mapped of a Input Field to the java.util.Date then message shows that its not supported. Plz suggest me how to handle Date with different formats ??

    If you always want the user to enter the date in dd/MM/yyyy, you can do the following.
    Goto Local Dictonary -> Simple types in your project and create a type known as "InputDate" (or whatever you feel) of built-in type 'Date'.
    Now specifiy its format in the 'Representation' tab as "dd/MM/yyyy" (case-senstive).
    Now declare a value attribute say "inputdate" in your context with this type and bind the inputfield to this context value attribute.
    This will solve your problem.
    But if you want the user to input date depending on the region he belongs, change the default locale date in Control Panel->Regional and Language Options->Change to English(UK) -> Customize -> Date Tab -> Sort Date Format to dd/MM/yyyy.
    Now clear the cache, delete temporary files and restart the machine. This should solve the problem.

  • Working with a projector file. How can center it, not allow scaling and change the title bar?

    I've tried using:
    import flash.system.fscommand;
    fscommand("allowscale", "false");
    fscommand("showmenu", "false");
    fscommand("fullscreen", "false");
    on frame 1, but they don't seem to work.  I'm going to be putting this project on a CD and the client wants to make sure it will open centered on the user's screen, which has not been the case so far.  It seems to open at different spots on different computers.
    They also want the title bar changed from "Adobe Flash Player 10" to their own title.
    Thanks in advance for the help.

    hkunz219 wrote:
    You can use: stage.scaleMode = StageScaleMode.NO_SCALE; As for the title bar change, you can change the title bar string using Resource Hacker. But i am not sure if that is legal. You will find the strings under the strings table.
    What did you mean by, "You will find the strings under the strings table."?  Were you talking about Resource Hacker?

  • How Can I validate an Cust_Id that has nubers and letters within it

    I am trying to validate a cust_id that has both numbers and letter in it. like this 111A12345678. the valid letters to be imputed are A,C,D,E,G,Z how can I validate this so that when the fourth character is any other letter than the above, like this 111B12345678 it display an error message that A,C,D,E,G,Z are the only valid letter that can be imputed in the fourth character.
    Your help is greatly appreciated
    Thanks
    Hank

    I think Sergio was wondering what Db version, 10G will give you regexp, if you're running 9i then a sql exists may do it for you
    select 1
    from dual
    where substr(:cust_id_item,4,1) in ('A','C','D','E','G','Z')

  • A friend gave me her VAIO laptop.How can I remove her ITUNES library and use mine which I want to sync with my Ipad and Iphone?

    A Friend gave me her VAIO laptop.How can I remove her ITUNES library and use my library.  Want to sync my Ipad and Iphone to My library.

    I believe when you plug her old iPhone in to your computer it will notify you that the phone is synced with another library and ask if you want to register it with your library.  At least this is how iPods work.  I'm not sure about iPhones.  If you want to actually use the phone as your own you may need to go through AT&T.
    If you're just looking to use the iPhone as an iPod (without the phone portion of it) you may run in to some problems.  The iPhone really wants to be on a cell network all the time.  I think you'd have to jailbreak it to get it to work properly as an iPod.
    Let us know what happens when you plug the phone in to your computer.

  • How can we validate a XML against his external schema XSD

    Hi;
    I use the XML library for create my XML file, I’m extracting the data
    from R3 and building the XML document.
    I wish to validate this document against his schema XSD built by third party (government organization) before i transfer this data (xml file)
    to the external entity.
    In my abap program:
    ¿How can i reach this validation level and if any
    error exists then how can i get or trap the detail information?
    this is a sample file XML with the external schema reference, as you can see in this part of the code.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <Comprobante xmlns="http://www.sat.gob.mx/cfd/2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sat.gob.mx/cfd/2 http://www.sat.gob.mx/sitio_internet/cfd/2/cfdv2.xsd" version="2.0" serie="A" folio="0000238" fecha="2006-09-01T19:32:03-05:00" sello="o4kAzhytaTKThSk9tbTQGg5OGacAltWZwxQPZuMg1XhfjMq5jJ0GyO7w2//bf8aTuHnbqwpkR7rIgIehGLy88Xb3Ck0EDsWZEAC1QUuqRq2iWKAnGQPS4l9s0QrJHt0Ziojjd0GQFek6BYXPdlmdTjLZ2x+J8ffYEGpIQZRB8=" noAprobacion="2755" anoAprobacion="2006" formaDePago="En una sola exhibicion" noCertificado="00001000000000806462" condicionesDePago="Neto a 30 días sin DPPP" subTotal="2531.99" descuento="0.00" total="2912.90" tipoDeComprobante="ingreso">
      <DomicilioFiscal calle="AVE. UNIVERSIDAD" noExterior="992 NTE." colonia="COL. CUAUHTEMOC" municipio="SAN NICOLAS DE LOS GARZA" estado="N.L." pais="MEXICO
    We are using SAP R/3 46C
    Thanks in Advance for your help.
    Alejandro Pérez

    Hi, Alejandro
    Did you found something on SAP side in order to generated this XML.
    Currently I´m trying to find out some on SAP but nothing at this moment.
    The company that I´m working needs to implement "Factura Electonica" also.
    Probably we will use external broker to do this for us, and we will send just Idoc to the broker.
    Please, let me know your progress on SAP side.
    Regards, Fabio

  • How can I validate my warranty with a refurbished iphone?

    On August 28th I visited Miami and I went to the Apple Store to replace my Iphone 4 broken out of warranty with a Refurbished Iphone.
    The problem is that the refurbished Iphone replacement never worked! I tried to verify my coverage status but it is out of warranty. I know that there are 90 days of warranty. However, how can I validate this warranty because the IMEI is not accepted to chat or contact Apple Support? Somebody can help me?
    Thank you

    SILsam wrote:
    I've already checked it, however the device does not have coverage. It was a refurbished iphone 4 and theoretically it has 90 days of warranty.
    According to your original post, your limited warranty is scheduled to expire on November 28th.  That service replacement warranty was never intended to include live support via chat or phone conversations with an AppleCare advisor.

  • How can I validate a date field in Portal Forms

    I have a date field in portal forms that I want to perform validation on to make sure it's in the proper format before being accepted (mm/dd/yyyy). How can I validate against that field?

    Hi Ben,
    I took the time to test and revise. This is code that will validate a date entry (format MM/DD/YYYY). Just paste this in the "Before the start of the form..." window of the Additional PL/SQL code section of the form. Then add validateDate(); into the onBlur event window of the field in question. Replace the CYCLE_END_DATE with the field name in question.
    HTP.P('
    <SCRIPT LANGUAGE=javascript>
    function validateDate() {
    var ddObj;
    var mmObj;
    var yyObj;
    var day;
    var mon;
    var year;
    var field_val;
    var field_name;
    for (var j=0; j < document.forms[0].elements.length; j++) {
    field_name = document.forms[0].elements[j].name;
    field_val = document.forms[0].elements[j].value;
    if (field_name.substring(field_name.indexOf(''DEFAULT.'') + 8, field_name.lastIndexOf(''.01'')) == ''CYCLE_END_DATE'') {
    var delimPos = field_val.search(/\//i);
    if (delimPos < 0)
    alert(''Invalid date entry! Please enter in MM/DD/YYYY format. '' +
    ''e.g, Dec 21, 2003 would be entered as 12/21/2003'');
    else
    if (field_val.length != 10)
    alert(''Invalid date entry! Please Please enter in MM/DD/YYYY format. '' +
    ''e.g, Jan 1, 2003 would be entered as 01/01/2003'');
    else {
    month = field_val.substring(0, field_val.indexOf(''/''));
    day = field_val.substring(field_val.indexOf(''/'') + 1, field_val.lastIndexOf(''/''));
    year = field_val.substring(field_val.lastIndexOf(''/'') + 1, 10);
    /* Need to subtract 1 from value because in Javascript, January begins with 0
    and ends with 11 for December */
    month = month - 1;
    ddObj = new Date(year, month, day);
    mmObj = new Date(year, month, day);
    yyObj = new Date(year, month, day);
    if (ddObj.getDate(ddObj.setDate(day)) != day)
    alert(''Invalid day!'');
    if (mmObj.getMonth(mmObj.setMonth(month)) != month)
    alert(''Invalid month!'');
    if (mmObj.getYear(mmObj.setYear(year)) != year)
    alert(''Invalid year!'');
    </SCRIPT>
    ');

  • How can i validate  the field directline under personal information of ESS?

    Hi all,
    How can i validate the field directline under personal information--> communication data  of ESS?The thing is we don't have NWDI setup in our organization.Is there any possibility of doing it under SPRO trn.
    Thanks and Regards,
    sam

    Hi,
    This is probably a wrong forum that you have posted your question to.
    Regards,
    Siddhesh

Maybe you are looking for