Why does AbstractCellEditor changes line at VK_ENTER, DefaultCellEditor not

Hi,
For BigDecimal values I wrote my own CellEditor which extends AbstractCellEditor.
However compared to the DefaultCellEditor there is a servere difference/problem:
When hitting <ENTER> in edit-mode, the AbstractCellEditor changes the line of the selection (y+1), whereas DefaultCellEditor simply jumps to the next cell right of it (x+1).
This is really irritating, because my users tend to work mostly keyboard-only.
Any idea how to get the DefaultCellEditor behaviour with my own Editor too?
Thank you in advance, Clemens
Edited by: user12866708 on 25.03.2011 06:44

Well it doesn't work if you start editing with the mouse (because the editor has focus and not the table I think) and I don't see anything special in DefaultCellEditor (just a call to stopCellEditing() in actionPerformed()).
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class TestTable4 {
    public static void main(String[] args) {
        EventQueue.invokeLater(new Runnable() {
            public void run() {
                try {
                    // both with Metal + Windows L&F for me
                    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
                catch (Exception e) {
                    e.printStackTrace();
                JTable table = new JTable(5, 5);
                //            table.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(
                //                    KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "selectNextColumnCell");
                JFrame frame = new JFrame("Test");
                frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
                frame.getContentPane().add(new JScrollPane(table));
                frame.pack();
                frame.setLocationRelativeTo(null);
                frame.setVisible(true);
}

Similar Messages

  • Why does FireFox change layout/settings during upgrades without asking ?

    Just upgraded to Firefox 18 (windows 7 desktop). Why does Firefox change layouts/settings without asking the user if he wants it or not???
    I am getting sick of those changes. I want to have at the google main page the options (as before) to search in all languages, or pages from a certain language or pages in a certain language (of course depening of the google address; f.i. at google.de for german languages, google.fr for french languages etc).
    In the latest Firefox 17 it was working as I wanted and described before: when I visited www.google.de/firefox of www.google.fr/firefox. Now those 3 options (under the search bar) are gone and I do not want to operate by clicking on the advanced search button. Those things should be visible under the search bar again.
    Also my STARTPAGE was GONE/DELETED after the update !!! Grrrrr.... Updating is OK but mozilla should not change user configured items !!!!!!!
    The above described problem has nothing to do with the google website.

    By the way, do Firefox and IE use the same proxy settings? You can view Firefox's here:
    orange Firefox button (or Tools menu) > Options > Advanced > "Network" mini-tab > "Settings" button
    The default is "Use system proxy settings".

  • Why does iPhoto change the sort order of the photos in my album when I attempt to share via Photo Stream?

    Why does iPhoto change the sort order of the photos in my album when I attempt to share via Photo Stream?

    Did anyone find a good way to sort the shared albums better, so that the ones you share with can better find their way around.
    You can arrange them manually in an album, select all and use the Photos ➙ Batch Change ➙ Date to menu option and check the box to add a set interval between photos. That will let the photos be sorted by date and be in the order you want:
    OT

  • Why does iChatAV3 change folders name sent to 2nd computer?

    Why does iChatAV3 change the actual folder's name (removes certain punctuation marks like forward slashes "/ " and replaces them with dashes "-" ) of attachments sent to 2nd computer on the same local network? The way I send a folder to the second computer via ichat on my own local network is to simply drag and drop the folder to the name on the Buddy list and hit send. Then i accept the folder on the target computer.
    I just sent a folder of 24 jpeg images to my second Powermac via ichatav3. (I have four macs on this particular network). The title of the folder was "Photos / 2000" but ichat changes the forward slash to a dash on the folder's name ...... and then drops the two and first zero ...... why? When received on the 2nd computer it reads the adjusted file name as" Photos -00" Not at all what I wanted to name this folder.
    In addition, Photoshop 7 (which is loaded to both systems) has issues seeing and opening the new files and folders until i retitle them per the original folder.
    I suspect the solution is not to use forward slashes at all when naming a folder of jpeg images.
    But why does ichatav3 also drop numbers from the title of these folders or attachments? Might it be that the newly generated file name already exists on the HD of the receiving system and hence will not save it under an identical name or title?
    If this is the case, shouldn't there also be a dialog box or warning that pops up saying i already have such a file on my current HD or at the very least a warning not to use punctuation marks on folders or attachments?
    Helpful suggestions in sending perfectly "intact" folders, files, and attachments via iChatav would be sincerely appreciated.
    SDMacuser

    HI SDMacuser,
    So far I have not sent a folder in the way you describe.
    I can not offer any assistance on this.
    I will test with EZ Jim when he is next around.
    Anyone else with any suggestions ?
    Ralph

  • Why does Pages change tab settings randomly in a document?

    Why does Pages change tab settings randomly in a document?

    Have no clue what is happening to make the font change style. Are you hitting any keyboard shortcuts or is a syle applied to those cells?
    There is no automatic Calendar generator, but Pages will generate sequences in tables and:
    http://www.freeforum101.com/iworktipsntrick/viewtopic.php?t=182&highlight=calend er+calendar&mforum=iworktipsntrick
    Peter

  • Why does adobe change my resolution when I open a PDF

    Why does Adobe change my resolution when I open a PDF?

    Without any details nobody can even start to guess what is happening.

  • Why does my ical on my ipod touch not sync with my ical on my desktop if I put in an event on the ipod calendar?

    Why does my ical on my ipod touch not sync with my ical on my desktop imac ical?
    It will if I put it in on my desktop though.
    Please help,
    Brie

    Probably because you did not tell the iPod to sync the calendar in iTunes.

  • Why does my yahoo mail sign in seal not appear while trying to sign-in

    Why does my yahoo mail sign in seal not appear while trying to sign-in when I use firefox only but with MS Internet explorer the sign-in seal appears with yahoo.com

    Many site issues can be caused by corrupt cookies or cache.
    * Clear the Cache
    Firefox/Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    and
    * Remove Cookies
    '''''Warning ! ! '' This will log you out of all sites you're logged in to.'''
    Press the '''Alt''' or '''F10''' key to bring up the tool bar.
    Followed by;
    Windows; '''Tools > Options'''
    Linux; '''Edit > Preferences'''
    Mac; ''application name'' '''> Preferences'''
    Then '''Privacy.'''
    Under '''History''', select Firefox will '''Use Custom Settings'''.
    There is a button on the right side called '''Show Cookies'''.
    If there is still a problem,
    '''[https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode Start Firefox in Safe Mode]''' {web link}
    While you are in safe mode;
    Press the '''Alt''' or '''F10''' key to bring up the tool bar.
    Followed by;
    Windows; '''Tools > Options'''
    Linux; '''Edit > Preferences'''
    Mac; ''application name'' '''> Preferences'''
    Then '''Advanced > General.'''
    Look for and turn off '''Use Hardware Acceleration'''.
    Poke around safe web sites. Are there any problems?
    Then restart.

  • HT5781 why does my iPhone 4 ping constantly and not connect to my macbook air

    why does my iPhone 4 ping constantly and not connect to my macbook air in itunes

    Hi, pinkshaz. 
    You may find this article helpful when troubleshooting iTunes not recognizing your iPhone.  If you have any security software, disable this software and test the results.
    iOS: Device not recognized in iTunes for Mac OS X
    http://support.apple.com/kb/TS1591
    Cheers,
    Jason H.

  • Why does my 3rd generation 8gb ipod touch not pick up on ios 5 update?

    Why does my 3rd generation 8gb ipod touch not pick up on ios 5 update?

    I know you are not apple though I believe I still have apoint. As you can see the release date for these two iPod touches is differentby about a year. My iPod was sold as an apple iPod touch 8 GB third generation,and as I can see from this page and many others have experienced this. I wouldcomplain to apple though there seems to be no actual way to do this withouthaving to fork out for additional support, which is unacceptable also my iPodwas bought form a reliable UK retailer. It is not just the seller who names itas a 3rd generation I have also included a print screen of a trade in offerfrom a large phone shop site:

  • HT204053 Why does it say my apple ID is not eligible to purchase gift certificates

    Why does it say my apple ID is not eligible to purchase gift certificates

    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • Why does new music downloaded on one device not show up in the library of the other device?, Why does new music downloaded on one device not show up in the library of the other device?

    Why does new music purchased on one device not show up in the library of the other?

    Hi Bev5638,
    Welcome to the Support Communities!
    The article below will explain how to set up Automatic Downloads for your computer and devices.
    iTunes Store: How to enable Automatic Downloads
    http://support.apple.com/kb/ht4539
    Cheers,
    - Judy

  • Why does a movie I bought on iTunes not work without internet?

    Why does a movie I bought on iTunes not work without internet?

    As long as the film has been fully downloaded (or synced from your computer's iTunes) then you should be able to watch it in the iPad's Videos app without needing to be online - is that how you are trying to view it ?

  • Why does Adobe promise return calls and then not do so?

    Why does Adobe promise return calls and then not do so?   To avoid talking with customers?

    Thanks for your reply - unfortunately I have talked with an Adobe
    representative in India and their action is to put one on hold
    indefinitely.  I am annoyed  because I paid an additional $60 to them 
    for no reason.  Appreciate your comment.
    des

  • Why does Illustrator change CMYK color numbers when set to preserve them?

    I'm using CS2 on Mac OSX 10.4. Recently I tried importing a Photoshop image into Illustrator and then matching a color in Illustrator to a color in the Photoshop document. But Illustrator changed the CMYK values of the color in the Photoshop document even though I have "Preserve CMYK colors" checked in the color setup window. Both applications and files are set to SWOP v2.
    I don't have the same problem when placing either Photoshop or Illustrator files into InDesign.
    I ended up recreating the project in InDesign to get consistent color, but I need to know how to make Illustrator preserve color numbers for the project that will come up for which I need Illustrator features.
    Thanks.

    So here we are at Illustrator CC and this very simple integration has not been fixed... because as far as I'm concerned... it is a BUG!
    Seriously, no offense to @Steve Fairburn... but that is just so archaic for a "suite" of programs that should work well together.
    There is absolutely NO need for CMYK colors to be valued beyond solid percentages in 1% increments in either Illustrator or InDesign!
    Here's a stupid workaround if you need to link images, and pull colors:
    Load the image as "linked" -> duplicate it and choose "embed" -> pull the colors and make swatches with the eyedropper tool... then throw it away. You could also just relink the file after an embed, making sure to check the Adanced Options checkbox.
    ADDITIONAL NOTES:
    1) why does InDesign give you the ability to "Reveal the Linked Image on the Desktop", whereas in Illy you can only reveal in Bridge?
    2) "placing" the same PSD/PDF image in InDesign and Illustrator: ID allows for correct eydropper color pulling, while IL does not until you embed it.

Maybe you are looking for

  • How do I extract a set of rows from a table based on specified criteria?

    I am using Numbers '08. I have a table that looks like this: I would like to, programmatically, find the MAX amount of all the 'Clothing' category items. More generally I'd like it to work like the COUNTIF function where I can do this: MAX(INCLUDEIF(

  • Itunes 10.6.1

    I cant download itunes 10.6.1?? It goes through the wizard then i get a error message saying it hasnt finished installation?? Help!! i want to update my ipod touch4 to the latest software... but i need itunes 10.6.1 :-(

  • Pic and video from camcorder to iphone????

    i have a HUD hard disk drive JVC camcorder made by Everio. It syncs directly to my pc using USB. I was wondering is there any way to transfer pic and video from my camcorder to my iphone either direct from camera or from the sync center on my pc for

  • Membership expired but I got receipt of payment

    My Photoshop for photographers subscription is somehow expired? When starting photoshop I get this popup: If I click Try Again I get a message like this: But when starting Photoshop again I get the membership expires popup, it just loops over again.

  • Photo looks different when decreasing exposure with adj. brush & when decreasing exp. on whole photo

    I want to darken the overexposed sky in a photo. I reduced the exposure ( - 4 EV) of the whole photo to see how the sky would look. It looked great. Deep blue sky with white clouds with light gray areas. Then I reset the exposure & painted the sky wi