LISTENING FOR BACKSPACE WITH A KEY LISTENER

I have a key listener and I want to know how I find out if backspace has been pressed.
Thanks

I created a JTextField and added it to a JPanel which was added to the contentPane.
When I add my key listener to a JTextField or the the JFrame, the code suggested above works fine. (JKD1.3, Windows 98)
When I add the key listener to the JPanel it doesn't work.

Similar Messages

  • Optimal read write performance for data with duplicate keys

    Hi,
    I am constructing a database that will store data with duplicate keys.
    For each key (a String) there will be multiple data objects, there is no upper limit to the number of data objects, but let's say there could be a million.
    Data objects have a time-stamp (Long) field and a message (String) field.
    At the moment I write these data objects into the database in chronological order, as i receive them, for any given key.
    When I retrieve data for a key, and iterate across the duplicates for any given primary key using a cursor they are fetched in ascending chronological order.
    What I would like to do is start fetching these records in reverse order, say just the last 10 records that were written to the database for a given key, and was wondering if anyone had some suggestions on the optimal way to do this.
    I have considered writing data out in the order that i want to retrieve it, by supplying the database with a custom duplicate comparator. If I were to do this then the query above would return the latest data first, and I would be able to iterate over the most recent inserts quickly. but Is there a performance penalty paid on writing to the database if I do this?
    I have also considered using the time-stamp field as the unique primary key for the primary database instead of the String, and creating a secondary database for the String, this would allow me to index into the data using a cursor join, but I'm not certain it would be any more performant, at least not on writing to the database, since it would result in a very flat b-tree.
    Is there a fundamental choice that I will have to make between write versus read performance? Any suggestions on tackling this much appreciated.
    Many Thanks,
    Joel

    Hi Joel,
    Using a duplicate comparator will slow down Btree access (writes and reads) to
    some degree because the comparator is called a lot during searching. But
    whether this is a problem depends on whether your app is CPU bound and how much
    CPU time your comparator uses. If you can avoid de-serializing the object in
    the comparator, that will help. For example, if you keep the timestamp at the
    beginning of the data and only read the one long timestamp field in your
    comparator, that should be pretty fast.
    Another approach is to store the negation of the timestamp so that records
    are sorted naturally in reverse timestamp order.
    Another approach is to read backwards using a cursor. This takes a couple
    steps:
    1) Find the last duplicate for the primary key you're interested in:
      cursor.getSearchKey(keyOfInterest, ...)
      status = cursor.getNextNoDup(...)
      if (status == SUCCESS) {
          // Found the next primary key, now back up one record.
          status = cursor.getPrev(...)
      } else {
          // This is the last primary key, find the last record.
          status = cursor.getLast(...)
      }2) Scan backwards over the duplicates:
      while (status == SUCCESS) {
          // Process one record
          // Move backwards
          status = cursor.getPrev(...)
      }Finally another approach is to use a two-part primary key: {string,timestamp}.
    Duplicates are not configured because every key is unique. I mention this
    because using duplicates in JE has more overhead than using a unique primary
    key. You can combine this with either of the above approaches -- using a
    comparator, negating the timestamp, or scanning backwards.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to create manual key for AES with 256 key size

    we are just finding Different Approch for secure Key Genration and Store.
    For security purpose which way would be secure to store key in database and retrive that key.
    And can u tell me how to create secure maual key.
    Database user has access they should not able to find the what key we are using .
    Anybody has idea.

    1) Use 'keytool' with option -genseckey
    2) Use SecureRandom and store in a Java Keystore.
    3) Use a Secure Random with something like http://www.strongkey.org/
    4) Use hardware encryption such as produced by nCipher and others.
    There are many other approaches and I would suggest that you bring in an expert to advise you.

  • Override "crtl + tab" key behaviour with "tab" key for JtextArea .

    I am trying to override the "crtl + tab" key behaviour for JTextArea with "tab" key plus add my own action. I am doing the following.
    1. Setting Tab as forward traversal key for the JTextArea (the default traversal key from JTexArea is "crtl + Tab").
    2. Supplementing the "crtl + Tab" key behaviour with my custom behaviour.
    For the point 2 above, I need to get hold of the Action represented by the "crtl + Tab" key so that I could use that and then follow with my own custom action. But the problem is that there is no InputMap entry for "crtl + tab". I dont know how the "crtl + tab" key Action is mapped for JTextArea. I used the following code to search the InputMap.
                System.out.println("Searching Input Map");
                for (int i = 0; i < 3; i++) {
                    InputMap iMap = comp.getInputMap(i);
                    if (iMap != null) {
                        KeyStroke [] ks = iMap.allKeys();
                        if (ks  != null) {
                            for (int j = 0;j < ks.length ;j++) {
                                System.out.println("Key Stroke: " + ks[j]);
                System.out.println("Searching Parent Input Map");
                for (int i = 0; i < 3; i++) {
                    InputMap iMap = comp.getInputMap(i).getParent();
                    if (iMap != null) {
                        KeyStroke [] ks = iMap.allKeys();
                        if (ks  != null) {
                            for (int j = 0;j < ks.length ;j++) {
                                System.out.println("Key Stroke: " + ks[j]);
                }In short, I need to get the Action associated with the "crtl + tab" for JTextArea.
    regards,
    nirvan.

    There is no Action for Ctrl+TAB. Its a focus traversal key.

  • Mapping error at deployment with foreign key data rule

    I have created data rules for enabling foreign key constraints. There are 4 foreign key constraints on the fact table.
    For the 1st foreign key ... its a single key match key1 on table 1
    For the others, its a composite key .. key1 and key2 on table 2
    key1 and key3 on table 3
    key1 and key4 on table 4
    When I implement with the single key foreign key constraint the mapping works fine. But when I apply the other foreign key data rules for composite keys, I get the following message while deploying ....
    M_CNT Create Warning ORA-06550: line 209, column 3:
    PL/SQL: ORA-00909: invalid number of arguments
    M_CNT Create Warning ORA-06550: line 520, column 65530:
    PL/SQL: SQL Statement ignored
    M_CNT Create Warning ORA-06550: line 56, column 65530:
    PL/SQL: SQL Statement ignored
    M_CNT Create Warning ORA-06550: line 673, column 3:
    PL/SQL: ORA-00909: invalid number of arguments
    The data rule setup done is type Referential
    Specify the number of attributes in row relationship - 2
    Specify the referencing cardinality of row relationship
    Minimum Count 1 Maximum Count n
    Specify the referenced cardinality of row relationship
    Minimum Count 1 Maximum Count n
    What is it that I am doing wrong ?
    Any suggestions. Help !!!!
    Regards,
    AW

    Hi AW,
    How can I overcome this situation ?The best solution as suggested by Jörg is use of surrogate keys.
    For every production key (composite or single) generate a corresponding surrogate key using sequence operator in staging area.
    This will not just solve your problem but it will be faster also (the joins will be faster with system-generated sequence numbers),
    In a data warehouse use of production keys as primary key for linking with (foreign key) is not recommended, keep the production keys as additional attributes.
    Regards,

  • Maintenance View for custom table with foreign key relationship

    Hi Folks,
         I have created a custom table with foreign key relationship with other check tables. I want to create a maintenance view / tablemaintenance generator. What all things I need to take care for the foreign keys related fields while creating the maintenance view / tablemaintenance generator.
    Regards,
      santosh

    Hi,
    You do not have to do anything explicitely for the foreign key relationships in the table maintainance generator.
    Create the table maintainance generator via SE11 and it will take care of all teh foreign key checks by itself.
    Regards,
    Ankur Parab

  • Best Practice loading Dimension Table with Surrogate Keys for Levels

    Hi Experts,
    how would you load an Oracle dimension table with a hierarchy of at least 5 levels with surrogate keys in each level and a unique dimension key for the dimension table.
    With OWB it is an integrated feature to use surrogate keys in every level of a hierarchy. You don't have to care about
    the parent child relation. The load process of the mapping generates the right keys and cares about the relation between the parent and child inside the dimension key.
    I tried to use one interface per Level and created a surrogate key with a native Oracle sequence.
    After that I put all the interfaces in to one big Interface with a union data set per level and added look ups for the right parent child relation.
    I think it is a bit too complicated making the interface like that.
    I will be more than happy for any suggestions? Thank you in advance!
    negib
    Edited by: nmarhoul on Jun 14, 2012 2:26 AM

    Hi,
    I do like the level keys feature of OWB - It makes aggregate tables very easy to implement if your sticking with a star schema.
    Sadly there is nothing off the shelf with the built in knowledge modules with ODI , It doesnt support creating dimension objects in the database by default but there is nothing stopping you coding up your own knowledge module (use flex fields maybe on the datastore to tag column attributes as needed)
    Your approach is what I would have done, possibly use a view (if you dont mind having it external to ODI) to make the interface simpler.

  • Hi my iMac has decided to come up for the 5 time Work the ?  Symbol just tris time everytime i try to restart the iMac with any key it won't work, then I try also i knserted the installation dvd and it does not, If media is getting scratched in the drive

    Hi my iMac has decided to come up for the 5 time With the ?question mark   Symbol just this time when i try to restart the iMac with any key it won't work, then I try also to insert the installation dvd and stard with yhe C or D key
    Still no way to grt it starting, also I notice the DVD drive is getting scratched in the drive just before it outomaticly ejected.
    media is getting scratched after been used and ejected by my iMac without loading .
    Please help!!! I  to finish my college work and have no way of  work on it! HELP
    Thanks

    Boot off your *original* Install Disk while holding down the *d key*, (not c key), then run the extended Apple Hardware Test. Some disks require you to use the Option key at bootup to select AHT. Some models have a separate AHT CD. Some have it on the Disc #2.
    The Memory test can really only be trusted if it finds a problem, not if it doesn't find a problem.
    Memtest OS X...
    http://www.memtestosx.org/joomla/index.php
    Rember is a freeware GUI for the memtest ...
    http://tech.kateva.org/2005/10/rember-freeware-memory-test-utility.html

  • Request for GX 633 fn key swap with left ctrl

    Hi Svet,
    Request for GX 633 fn key swap with left Ctrl please
    Mainboard : Gx630/GX633
    PCB Version : Ver.001
    BIOS Version : E1652NMS VER.10P
    BIOS Date : 12/02/2009
    EC Version : 1652EMS1 Ver1.16  11/27/2009
    thank you

    Quote from: RudiAk on 01-January-10, 03:45:24
    Hi Svet,
    Request for GX 633 fn key swap with left Ctrl please
    Mainboard : Gx630/GX633
    PCB Version : Ver.001
    BIOS Version : E1652NMS VER.10P
    BIOS Date : 12/02/2009
    EC Version : 1652EMS1 Ver1.16  11/27/2009
    thank you
    Quote from: RudiAk on 05-January-10, 19:38:51
    Hi Svet,
    Anything on my request please?
    Thank you
    Done, check your e-mail

  • Invoke wallet key for use with DBMS_CRYPTO package

    Hello,
    I intend to use DBMS_CRYPTO and use personal key that is already stored in a wallet (file). Which steps must i take to bring this key as a parameter to DBMS_CRYPTO.ENCRYPT for encypting BLOB. Al examples i found till now use only self created keys.
    Many thanks to enyone who can help me with an advice.
    Ernest

    Sorry, but you're in the wrong forum (as this one is only for issues with the SQL Developer tool). You'll get more answers in the SQL And PL/SQL forum.
    Have fun,
    K.

  • Problems with fuction keys for brightness

    i have laptop hp 15 r006tx Product number: G8D30PA#ACJ 
    i have problems with functions keys for brightness , actually it does't works i can't actually adjust brightness, please help me.....................

    OK...
    I was right.  You have no graphics driver installed for the Intel HD graphics adapter.
    I am very surprised you were able to install the nVidia driver because usually you get an error that states you need to install the Intel graphics driver first.
    Once you install this driver, the Microsoft Basic Display adapter should be replaced by an Intel HD graphics adapter and you should be able to adjust the screen brightness.
    Make sure you have installed this Intel chipset driver first and reboot.  If you have done this already, you can skip this step.
    http://h10025.www1.hp.com/ewfrf/wc/softwareDownloadIndex?softwareitem=ob-130504-1&cc=us&dlc=en&lc=en...
    Next, install the Intel HD graphics driver and reboot.  This driver is for W8.1.  If you installed W8, you need a different graphics driver.
    http://h10025.www1.hp.com/ewfrf/wc/softwareDownloadIndex?softwareitem=ob-130257-1&cc=in&dlc=en&lc=en...

  • GR  via MIGO allowed for POs with conf control key

    GR  via MIGO allowed for POs with conf control key.
    where GRs should be allowed only based on ASN (INB) Del.
    How to restrict GR via MIGO when confirmation control key is set?

    ideally it should work, however check Conformation Control Key LA.
    Confirmation sequence " GR relevant " and GR assignemnt is checked or not, in SPRO > MM> Purchasing --> Confirmations --> Set up confirmation control.

  • Costing run for materials with special procurement key

    Hello,
    Since moving to ECC6, the costing run for materials with special procurement keys is not pulling the marked price from the materials the special procurement keys point to. Only the released prices are pulled.
    Example:
    Material A, plant A has a future price (costing 2 tab) of 100 and a current price of 99
    Material A, plant B has special procurement key Z1 (costing 1 tab) which pulls the costing from Material A, plant A
    In our old system (46c) the costing run for Material A, plant B would pull 100.
    In ECC6, the costing run for Material A, plant B pulls 99
    Anyone that can push me in the right direction?

    Hi,
    Based on the info provided thus far, the result that you notice in ECC 6.0 is right as it is picking the current standard price based on your setup.
    Now why it is picking the future price in 4.6c, well for that you will have to do a detail check as in which variant is being used etc. I would suggest you to work with your CO personnel on this. Do a costing run for this particular material via CK11n using the variant which you mentioned & see the results.
    Or if you can upload the screenshots (picasaweb or some other portal) of the valuation variant you're using in 4.6c, along with Acctng view 1 & 2, costing view 1 & 2 details of the material it would help to have a better understanding.
    Regards,
    Vivek

  • Wrong with activation key product for windows 7

    Hello everyone 
    I have downloaded windows 7 from my college website (Microsoft Windows 7 with Service Pack 1 Debug/Checked
    Build 32-bit (English) - DreamSpark ) 
    then I chose windows 7 home basic during installation 
    finally every time I try to active windows 7 it says "the product key
    you entered wont work with this edition of windows 7 you must either run windows 7 setup or enter a windows home basic product key"
    do I picked a wrong version in the installation of windows 7 ? whats the matter ? my windows got three more days to be activated and I dont know what to do, there wasn't any description on
    my college website on how to active
    please help me ASAP ! 
    Regards 

    You picked the wrong version Othman92.  The Checked/Debug build is intended only for very specific uses like windows driver development.   See this page for more infO: http://msdn.microsoft.com/en-us/library/windows/hardware/ff543450(v=vs.85).aspx
    Thanks,
    Mike
    Unfortunately your post is off topic here, in the MSDN Subscriptions feedback forum, because it is not feedback regarding the MSDN Subscription. This is a standard response I’ve written up in advance to help many people (thousands, really.) who
    happen to post their question in my forum, but please don’t ignore it.  The links provided below I’ve collected to help with many issues we’ve seen.
    For technical issues with Microsoft products that you would run into as an end user of those products, one great source of info and help is
    http://answers.microsoft.com, which has sections for Windows, Hotmail, Office, IE, and other products.   Office related forums are also here:
    http://office.microsoft.com/en-us/support/contact-us-FX103894077.aspx
    For Technical issues with Microsoft products that you might have as an IT professional (like more technical installation issues, or other IT issues), you should head to the TechNet Discussion forums at
    http://social.technet.microsoft.com/forums/en-us, and search for your product name.
    For issues with products you might have as a Developer (like how to talk to APIs, what version of software do what, or other developer issues), you should head to the MSDN discussion forums at
    http://social.msdn.microsoft.com/forums/en-us, and search for your product or issue.
    If you’re asking a question particularly about one of the Microsoft Dynamics products, a great place to start is here:
    http://community.dynamics.com/
    If you really think your issue is related to the MSDN Subscription, and I screwed up, I apologize!  Please repost your question to the discussion forum and include much more detail about your problem, that could include screenshots of the issue
    (do not include subscription information or product keys in your screenshots!), and/or links to the problem you’re seeing. 
    If you really have no idea where to post this question, then you shouldn’t have posted here, because we have a forum just for you!  It’s called the ‘Where is the forum for…?’ forum and its here:
    http://social.msdn.microsoft.com/forums/en-us/whatforum/
    Please review the topic of the forum you’re posting in before posting your question.  Moving your post to the off topic forum.
    Thanks, Mike
    MSDN and TechNet Subscriptions Support <br/> Read the Subscriptions <a href="http://blogs.msdn.com/msdnsubscriptions">Blog! </a>

  • InvalidKeyException: Could not initialize for signing with the given key

    InvalidKeyException: Could not initialize for signing with the given key
    What does this caused? And how can I make following code to work? Is it bug, or is it supposed to do so?
              X509CertImpl newCert = new X509CertImpl(certInfo);
              newCert.sign(caPrivateKey, SIG_ALG_NAME);

    Your key is probably using a different algorithm:
    Signature signature =
    Signature.getInstance( SIGNATURE_ALGORITHM );
    PrivateKey privKey =
    ( PrivateKey ) this.store.getKey( alias, pwd );
    Make sure the SIGNATURE_ALGORITHM (SHA1WithRSA, SHA1WithDSA)
    matches the algoright of the keystore.
    your will see it when casting the private key into a concrete
    key instance:
    RSAPrivateKey privKey =
    ( RSAPrivateKey ) this.store.getKey( alias, pwd );

Maybe you are looking for

  • BEX64 error after updating to CC 2014.1

    I have Premiere Pro CC 2014 in my office, then 2014.1 was release so I was excited to upgrade. Then every project I opened crashes with BEX64 error. Is My specs or something? Intel Core  i7 4770 16gb RAM Intel HD Graphics 4600 please email me at : [e

  • Problem due tot he postback

    Hello, I have a page on which I display a part of a list of images. And the user can navigate in the pages of that list by clicking on a navigation buttons (first,previous,next and last). When the user click on the Go Back button of the browser the p

  • ICal calendars on my Mac don't sync with iCloud

    Am I missing something? When I configured iCloud, I noticed that I suddenly had duplicates of my Address Book and Calenders. My Mac can sync with my phone, my phone can sync with iCloud, but I can't sync my Mac with iCloud. Maybe I'm too lazy and hav

  • Passing parameter between different iViews

    Hi experts,                How can i pass a parameter from an iView created from .par to a webdynpro iView ? Regards, Shabeer.

  • What Is The Price Of Apple iphone 4 in Gujarat?

    What Is The Price Of Apple iphone 4 in Gujarat?