How to stop some keyevent listening ?

Hi,
I have a number of JTextPane organized as cells of a table and I would like to go from one to another with the enter/tab key; but when I do that, in addition to jump from a cell to another, their is a enter/tab keyevent send to the JTextPane that had the focus. Is it possible to configure the JTextPane to ignore enter and tab key ?
Thanks a lot

ok, I'v just implemented it, it woks!
I didn't know that the component send envents before processing it itself, I've learn a really useful thing.
In fact it is explicitly writed in the API of the InputEvent class:
Thanks a lot

Similar Messages

  • I would like to know how i stop some albums ive bought from transfering to my iphone i delete them from itunes but when i sync my phone they transfer from my iphone this is a pain some one please help!!

    I would like to know how i stop some albums ive bought from transfering to my iphone i delete them from itunes but when i sync my phone they transfer from my iphone this is a pain some one please help!!

    Burb79 wrote:
    I thought of that one two tried it but still no joy. I have an ipad2 as well which I set up to not sync any music to it but for some reason the albums have got onto that as well. im thinkin its somthing to do with the dam cloud thing
    Go to Settings/ Store and under the category "Automatic Downloads" you can turn OFF the automatic download of purchases to your device (this needs to be done for each device). There's also a setting in iTunes just for automatic pushes to your iTunes library.
    To remove a purchase you've made directly to your device, you can either:
    a- Swipe across the song title from left to right and press Delete, or
    b- If you auto-sync your device, connect to iTunes and click on the Music tab where you define your sync settings (the Music tab is to the right of the overall Summary page of your device). At the bottom of the Music tab you'll see direct purchases that are on your device -- simply un-check those and click "Apply" or "Sync" to remove them.
    c- If you manually manage music on your device, connect to iTunes and click the small arrow to the left of your device name, and then click on the Music folder under your device. Then navigate to the item(s) you want to remove and then delete them.
    To prevent things from syncing from your library to your device, there are many ways to do that (un-checking things in your library is one way, but not the best IMO). Might want to read the manual or some online tutorials on iTunes if you want to learn more.

  • How to stop and start listener auto. when database is open and shutdown?

    Hi,
    is there a way, in Window , i can shutdown the listener service when the database is shutdown (the rdbms service still up) and startup the listener when the database is open?
    Thanks

    Ron_B wrote:
    In simple way,
    when the window rdbms service is runing and the database is in shutdown or stop state, the listener have to be stop.
    The listener have to be start only when the database pass from nomount to mount.With mentioning the fact that there is abosultely no such dependency between listener and database, I am really curious to know that why you want to do it? Listener is merely a process and even if its running, there is no such harm or resource consumption it would do that you need to shut it down as and when db would be.
    HTH
    Aman....

  • We were wondering how you stop some apps from running with out deleting them something like a task manager and in my settings im missing the application button in it how do i get it back and stop some apps its making it run really slow

    how do you stop apps with out deleting them i have looked for something like a task manager and nothing and researched about it and it says to go into your settings and then click applications but i dont have one can someone please help[ me thank you

    Double click the Home button. The bottom row shows the recently used apps. Touch and hold the app until they all start to wiggle then tap the circled minus sign by apps you want to remove. Press the Home button to return to normal.
    However, that is recently used apps not apps doing something. Some apps will do things all the time/periodically like checking for Notification, new mail. Yu can turn those off in the apps themselves.
    Just what are you trying to accomplish?

  • How to stop some apple id call my apple id and/ or my phone number by face time

    Hi there, my niece lost her iPod touch at school and in there had my phone number and my apple Id. Unknow people stolen the iPod keep calling me by face time even I changed my apple id. Can someone help me to stop them bother me like that way. They cover their face by blanket and talk crazy, if I do not accept,they will call me again and again. I am stuck ! Help me please !

    You can delete the iCloud account from her phone by going to Settings>iCloud, scroll to the bottom and choose Delete Account.  I believe you will get a prompt asking if you want to remove or keep the data on the phone; if you don't want your contacts on her phone choose delete.  As far as the contact on your old SIM card, if it is the same size as the iPhone SIM card you can put it in the iPhone and import the contacts (see http://support.apple.com/kb/HT4994).  If the SIM card won't fit, then you would need to either export the contacts to your computer using appropriate software, upload your contacts to a cloud service so you can download them to your computer, or in some cases take it and your iPhone to your retailer and ask them if they can do the transfer for you.  (It's also possible to cut a SIM card down to fit but it can be tricky to get it right.  There are articles on this if you search with Google.)  This video might help: http://www.youtube.com/watch?v=ypZpYNpfa9E.

  • Sending Strings Over GKSession - How to stop some craziness?

    Sounds simple, right? But the tricky part is I am trying to retain the header structure from GKTank... I am quite desperate for help at this point as I've been flailing around on this all day and all night....
    All my other events use this structure already and work just fine..and after a ton of trial and error I'm very close... hoping I can get one of you experts to take a look. The issue is that when my strings are less than 8 characters, the results get very strange....
    Here's the relevant code: (kMaxPacketSize is a constant of 1024)
    To send Data: (this is straight from GKTank, actually)
    - (void)sendNetworkPacket:(GKSession *)session packetID:(int)packetID withData:(void *)data ofLength:(int)length reliable:(BOOL)howtosend {
    static unsigned char networkPacket[kMaxPacketSize];
    const unsigned int packetHeaderSize = 2 * sizeof(int); // we have two "ints" for our header
    if(length < (kMaxPacketSize - packetHeaderSize)) { // our networkPacket buffer size minus the size of the header info
    int *pIntData = (int *)&networkPacket[0];
    // header info
    pIntData[0] = packetNumber++;
    pIntData[1] = packetID;
    // copy data in after the header
    memcpy( &networkPacket[packetHeaderSize], data, length );
    NSData *packet = [NSData dataWithBytes: networkPacket length: (length+8)];
    if(howtosend == YES) {
    [session sendDataToAllPeers:packet withDataMode:GKSendDataReliable error:nil];
    } else {
    [session sendDataToAllPeers:packet withDataMode:GKSendDataUnreliable error:nil];
    In this particular case, I began by calling the above method thusly:
    NSString *myText = self.myLabel.text
    NSInteger len = [myText length];
    [self sendNetworkPacket:mySession packetID:NETWORKTEXTEVENT withData:myText ofLength:(len*2)+1 reliable:YES];
    and unwrapping like this on the other end:
    NSString *pStringData = (NSString *)&incomingPacket[8];
    Works like a charm... strings show up just fine on the other device.... except when the string is less than 8 characters...this causes crashes of EXCBADACCESS on the receiving device. When I check values for these short strings prior to sending over GKSession, the memcpy command does not properly embed the string into 'networkPacket' and keeps remnants from the last string that was transmitted.
    So, in an attempt to work around what is probably a flaw in my logic, I decided to see what happens if I pad the beginning and end of these short strings to make them over 8 characters, by defining another string 'spacer' and then sending a padded string instead of myText:
    NSString *spacer = @"zZzZ";
    NSString *bufText = [spacer stringByAppendingString:[myText stringByAppendingString:spacer]];
    len = [bufText length];
    [self sendNetworkPacket:mySession packetID:NETWORKTEXTEVENT withData:bufText ofLength:(len*2)+1 reliable:YES];
    This got rid of the issues with memcpy, and now all strings are embedded in 'networkPacket' properly, some just have the spacers on the beginning and end... no problem, right? I figured I'd just filter out the spacers on the other end, but guess what? I have even tried using the same code to disassemble the packet, prior to sending it, exactly the way I do on the receiving device... it disassembles fine, and I can re-create the string from the raw packet I send....
    However... (and this ONLY happens on the strings that have been padded) when I receive the data through GKSession I get totally random characters and even lengths! Sometimes I get odd system strings like 'tpenable' or 'uni0164' ... it's so bizarre... I don't understand what is making the padded strings get treated differently.... I tried padding all strings just to check and then they all act like this when transmitted... and again when I use the following code, prior to sending the packet, both test1 and test2 look fine:
    NSString *test1 = (NSString *)&networkPacket[8];
    unsigned char *testPacket = (unsigned char *)[packet bytes];
    NSString *test2 = (NSString *)&testPacket[8];
    NSLog (@"netPacket");
    NSLog (test1);
    NSLog (@"Packet");
    NSLog (test2);
    If you have any ideas, I'd really appreciate it!
    Message was edited by: Tech Guru

    [dataString bytes] returns a +const void*+ type. The compiler is complaining because you passed that +const void*+ pointer to a method that declared the 3rd arg to be a void*. The difference between the two pointers is that the first type doesn't want you to change the bytes that it's pointing to, while the second type doesn't care.
    For example:
    - myMethod:(const char *)foo {
    foo[3] = 'A'; // changing the value of the 4th byte at address foo
    In the above, the compiler should warn that your method changed the data which was referenced by a const char* type.
    But sendNetworkPacket doesn't do anything naughty like the above, it just copies the data at the given addy into a buffer. So you could have declared the data param as const void* like this:
    - (void)sendNetworkPacket:(GKSession *)session packetID:(int)packetID withData:(const void *)data ofLength:(int)length reliable:(BOOL)howtosend;
    The above change should get rid of the warning. If the compiler thinks you're changing that data in sendNetworkPacket (we know you're not doing that, but it's hard to argue with a compiler), you'll then get a new warning to that effect. In that case you might as well put a type cast in the call. I.e. take 'const' back out of the method declaration, and cast the arg in the call like this:
    [self sendNetworkPacket:mySession packetID:NETWORKTEXTEVENT withData:(void*)[dataString bytes] ofLength:len reliable:YES];
    The first try is preferable, since we like to avoid type casts, and since (I assume) sendNetworkPacket really doesn't want to change that data. But if the compiler won't cooperate, the second way will always work for you.
    Btw, putting the text into a NSData object is fine by me, but you could've also used any number of NSString methods that aren't deprecated (e.g. [myText UTF8String]). No need to go there now though. I'm guessing your early problems with some perfectly good methods were due to data type glitches. Because of mismatched data types, you may have abandoned the correct approach and gone down the wrong path.
    Once things got to the point where a NSString pointer was sent to memcpy, I think all of us were at risk of falling into darkness. I stared at the code for a very long time, wondering if everyone in the World but me knew that trick. Next time you get a data type error, maybe post the code here and let us try and help out while the problem is still easy to solve, ok?
    All the best,
    Ray

  • How to consume some keyEvent?

    Why can't I disable the key A but keeping other key?
    Here is my code.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class myDropZone extends JTextPane {
    public myDropZone(){
    super();
    this.setMargin(new Insets(0,0,0,0));
    public void processKeyEvent(KeyEvent e){  
    if (e.getKeyCode()== java.awt.event.KeyEvent.VK_A){
    e.consume();
    else{
    super.processKeyEvent( e );
    Please give me your valuable advice.
    Ivan

    ok, I'v just implemented it, it woks!
    I didn't know that the component send envents before processing it itself, I've learn a really useful thing.
    In fact it is explicitly writed in the API of the InputEvent class:
    Thanks a lot

  • How do you make Mozilla listen to users and stop FFFFirefox Auto Updating despite being set to NOT auto update?

    I am spitting nails
    After all the STUPID problems outlined here
    https://support.mozilla.org/en-US/questions/999831?esab=a&s=&r=0&as=s
    I set Firefox to stop auto updating,
    Then the other day I installed a new user on my laptop, when they loaded Firefox it auto updated MY version of Firefox.
    Has NOTHING been learnt?
    STUPID STUPID STUPID STUPID STUPID
    So I have 2 questions
    How do you make Mozilla listen to users?
    and how do prevent what happened to me happening again?

    SuperSluether
    Not a millionth, you have only provided 150 answers and I doubt they were all this issue.
    If you don't like it, don't use it.
    If a business took this attitude they would soon be out of business
    Updates help KEEP YOU SAFE
    Sometimes, but in my experience FFirefox updates can really screw up your system, lose you data, mess up your user interface. I have run IT for one of the biggest intranets on the planet and we never allowed even Mictosoft updates until we did User Acceptance Testing and understood the impact of the upgrade. I am a grown up not a child, I have system where I test updates for performance, security and impact, I WILL DECIDE when I want to install it. If Mozilla wants to provide real security updates I would take them but if you look at the link in my OP you will see it said an update was security and it completely messed up.
    Updates add tons of great new features
    Actually with FFirefox in my experience they take more away than they add, things I did not ask them to take, they do not look at my config and leave my settings as they were and then tell me about new options, no they completely screw my productivity as it takes days to figure out how to undo the kwap they have added. Copying the AWFUL Chrome interface is not an improvement, Google has one of the worst UI's on the planet accross all their products.
    Firefox is designed to be customized PER USER, NOT CROSS-SYSTEM
    There are some things that benefit from being per user and some that are per machine, windows has group policies per machine and per user. My OP is telling Mozilla that this is another area where they have "designed" badly, I tell them this so that they improve it and in the vain hope that there is some config setting that will stop this nonsense.
    So SuperSluether you have not really helped, all you seem to say is FO if you do not like it. Good job you do not run a business. With that attitude probably best you do not contribute.

  • HT4061 Every time I use my I pad it keeps popping up with enter my iTunes password. I have nothing waiting to download and not trying to purchase anything yet every time I want to listen to music or use my apps this happens. Can anyone tell me how to stop

    Every time I use my I pad it keeps popping up with enter my iTunes password. I have nothing waiting to download and not trying to purchase anything yet every time I want to listen to music or use my apps this happens. Can anyone tell me how to stop this?

    If you get an error that says can't backup, try moving the existing backup file to a safe location and thry again. again. You can find the location of the backup file here:
    iPhone and iPod touch: About backups

  • I can't find preferences for the notes app. and every once in awhile some of my notes just disappear at start up, I see the name and then it refreshes and they are gone, very annoying. Can anyone tell me why it does this and how to stop it? thanks

    I can't find preferences for the notes app. and every once in awhile some of my notes just disappear at start up, I see the name and then it refreshes and they are gone, very annoying. Can anyone tell me why it does this and how to stop it? thanks

    Hi again, I am on an iMac using OSX 10.7.5, I"ve taken screenshots to show you I think my settings are correct

  • How we can control auto start/stop of db/listener on Unix/linux?

    How we can control auto start/stop of db/listener on Unix/linux?

    http://download-uk.oracle.com/docs/html/B10812_01/chapter2.htm#BABGDGHF

  • In random mode i tunes stops some songs before they are finished.  How do I fix that?

    In random mode, itunes stops some songs before they are finished.  How do I change the ending point of a song in itunes?

    If your country's iTunes Store allows you to redownload purchased tracks, I'd delete your current copies of the dodgy tracks and try redownloading fresh copies. For instructions, see the following document:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    Otherwise, I'd report the problem to the iTunes Store.
    Log in to the Store. Click on "Account" in your Quick Links. When you're in your Account information screen, go down to Purchase History and click "See all".
    Find the items that are not playing properly. If you can't see "Report a Problem" next to the items, click the "Report a problem" button. Now click the "Report a Problem" links next to the items.

  • How to stop //ANDROID:${from} has sent you a Sprint Voice Message. Call ${callbackno} to listen.?

    I keep getting this text message on my ipone4s every hour.
    //ANDROID:${from} has sent you a Sprint Voice Message. Call ${callbackno} to listen. CFGs1840.0=0fb15457cd82d2573628IAkhiRv//CM
    Does anyone know how to stop this. Sprint has no idea and it's really annoying.

    They have an auto-SMS sending program running that has your phone number in the list. Talk to your carrier about it. - ÇÇÇ

  • HT2515 How do I stop some one from contacting me?

    How do I stop some from contacting me on ichat?

    Hi,
    In an AIM Buddy list.
    Go to iChat Menu > Preferences > Accounts and then the specific account > Security tab
    In here select Block specific People and add the Screen name of the person you want to block.
    If Jabber (Googletalk, Facebook or other) and if they are already in your Buddy List then Right click them to Remove them or use the Buddies Menu and De-Authorise them.
    Basically AIM allows anyone to "call" your Screen name and only the Block or the restricted Allow options are the way to control who can contact you.
    With Jabber they can Invite you to be a Buddy but if they are not Authorised (and then in the list) they cannot send you messages.
    8:18 pm      Wednesday; December 4, 2013
      iMac 2.5Ghz 5i 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • How to perform some action every time when AppServer starts/stops

    I need to start/stop some external processes every time when AppServer starts/stops. Is there standart mechanism or API to do this?

    Most of the app servers support a concept of startup and shut down classes (I use this feature in Web logic 6.1)
    The startup classes are executed every time you start the app server and the shutdown classes are executed everytime the app server is brought down.
    Here is a URL that will give u all the details you need to know for weblogic startup classes
    http://e-docs.bea.com/wls/docs61///////ConsoleHelp/startupclass.html
    This is the URL for shut down classes for web logic
    http://e-docs.bea.com/wls/docs61//////ConsoleHelp/shutdownclass.html
    hope this helps.
    regards,
    Abhishek.

Maybe you are looking for

  • Difference between FS10N and FBL3N

    Friends, When we run the FS10N report for a G/L a/c in a company code for the year 2007, it only shows an open balance of X amount. This amount is only for a particular business area. I have checked the settings and the report is not restricted for t

  • Consolidate Library Error

    Hi, I'm looking to migrate my iTunes library to another hard disk on my laptop.  I have followed steps on Apple's website where I reset the library location to the new drive and am now using the consolidate library function. I'll highlight 20GB of fi

  • How should I format an external hard drive to work with a Mac and a PC?

    I need to transfer some video files from a PC to a Mac, and would like to know to best format the drive such that I can move files from the PC to the Mac. Thanks, Hal

  • Can't get Quicktime videos to play once uploaded - using iWeb 08

    Please help. I just updated my work website and uploaded a few quicktime videos of my TV spots. These same spots were uploaded and played fine on my last website update last year. But this time around, they're not working so well. Once uploaded, if y

  • Having issue with start weblogic cluster with tangosol cluster

    Hi, Oracle Coherence Version 3.3.1/389p1 Grid Edition: Development mode We are using Weblogic 8.1.5 with Tangosol 3.3.1 on Linux servers. And we added the initializing logic in the servlet's init() method to get all NamedCaches and put into the Servl