SetRowSelectionInterval() not working on single-click in JTable

I have code that tries to move the highlighted row in a JTable back to the line you just edited instead of moving to the next line when you press enter after editing a cell (like you would normally see in a JTable or any spreadsheet program). If you double-click in the cell and edit the name, the code works correctly, but if you only single click the cell and enter the name, the code doesn't move the highlight - even though I know the code is being executed.
The code is nothing more than:
if(row == 0)
setRowSelectionInterval(0,0);
else
setRowSelectionInterval(row-1,row);
with row being the row you want to set the highlight to.
Does anyone know why this would work for a double-click edit of a JTable but not a single-click?

even though I know the code is being executed.How do you know that? Do you have a println immediately before the if (row == 0)of the code sample you gave us?

Similar Messages

  • HT1222 My mouse pointer in finder is not working by double clicking on the application.I have to double click and select open for opening the application.Can you suggest me some settings to fix this problem?

    My mouse pointer in finder is not working by double clicking on the application.I have to double click and select open for opening the application.Can you suggest me some settings to fix this problem?

    Hi,
    Try this ... reboot your Mac and see if double clicking works again.
    Also, you can just select the Application you like to open and hold down the Command+O to open.
    Also, did you check your setting for the mouse in system preferences.
    Dimaxum

  • My speakers from my iPhone 4S is not working I'm clicking on the buttons on the side nd the volume is not even showing getting louder or lower but when I plug in my ear phones I can hear it juss happen out of no where what sould I do ?

    My speakers from my iPhone 4S is not working I'm clicking on the buttons on the side nd the volume is not even showing getting louder or lower but when I plug in my ear phones I can hear it juss happen out of no where what sould I do ?

    Your iPhone charging port may have a minor short, causing iPhone to falsely sense it is connected to a dock turning off its speaker. Clean iPhone charging port with a clean dry toothbrush.

  • My mail on iMac is not working properly. Click on email, it hangs, showing previous email. Takes forever to load. "No message selected" showing in a blank screen

    My mail is not working properly: when I click on an email it hangs, frequently showing the previous email, often for up to a minute. Or it shows "loading" and just sits there showing nothing. OR there is a blank screen saying "no message selected". It's slow to load, and I'm not happy. Recently switched from Windows PC, not impressed so far. Very frustrating.
    Any suggestions would be gratefully received. (I upgraded to Mountain LIon, and don't think I had problems before I did so, though I hadn't had the computer for long.)

    Hi Sarah,
    Open Console in Utilities & see if there are any clues or repeating messages when this happens.

  • Save button is not working for ONE CLICK ACTION

    Hi All,
    We have embeded a custom table view in a standard component.While we are editing the first row of the table view by ONE CLICK ACTION & pressing the SAVE button of overview page,then the record is saved in the database. But if we edit any row other than the 1st one,the save button is not working.
    We have used transaction context here for simple object.
    lv_tx_ctxt = lr_ent_bt->get_transaction( ).
    my_tx_context->add_tx_context( lv_tx_ctxt ).
    Please suggest how we can focus on the current line which we are editing & can save the record in database?
    Thanks.

    Hi Hakan,
    Probabaly this is not my problem. I know that how bt one click we can get the desired row.
    Let me briefly explain you my requirement and currently where I am stuck.
    I have a assignment block ( custom) in the main overview page with a custom table view ( ie in the view we are displayng entries in the table view ) and the user can press edit button on any row and that will open the particular row in edit mode . User will change the value in any of the columns and press save button on the main component and the custom changes will be saved in the database.
    Now the problem that we are facing is when we are chnaging the first row it si working but when we are doing chnages in the 2nd row or 3rd row changes are not saved ( not even in the table view that is getting displayed) .
    *Let me briefly tell you the approach that we took  . Since our table view uses a simple object  ( which is not a related object with BTORDER so we need to explicitly save the simple object entities to transaction context and for doing that we have redefined the eh_onsave method in the overview page) .
    *Now the save button is in overview page so to pass the entry from our custom table view to overview we are using custom controller . The custom controller 's collection wrapper only has the first entry of the table view custom_controller->collection_wrapper->get_next is failing which is the reason why the 2nd entry is not getting saved.
    Can you tell me how i can get all the table entries in my custom controller's collection wrapper?
    Let me know if you have any other questions.

  • My right-click option is not working on my click box

    I created a button and applied the right-click option on it. My action is set to continue. When i publish to html my right-click does not work. it only works if you left click.
    Could anyone help. thanks

    Lilbiri
    Im having the same issue Penelope C had  2 years ago with the right-click function. heres the forum thread. i dont know if it was ever solved.
    http://forums.adobe.com/thread/753561?start=0&tstart=0
    It just wont work for me some how.

  • JAR suddenly not working on double click...

    I have a program that I have been working on for the past few months. I want to run it from the desktop in the form of a .jar file. I use netbeans to create the jar file. In previous versions, this has worked very well. With the most recent build, I have problems running it when clicking on it.
    When the .jar is within the project's folder it is possible to run by double clicking. When I take that same file and move it anywhere else, for example, the desktop, it will not run on double click. It forms a javaw.exe process and hangs. I can run the newly moved jar from the command line with "java -jar 'path'", but not with the double click I want. I have tried this on several computers using the same version of Java..
    This really puzzles me cause it has worked as intended for a few months now, but not anymore.. If anyone has any suggestions of why this might be happening, it would be very much appreciated as I really need this thing to run like I hoped it would
    Thanks!

    no, there is a bug in your code that is causing this strange behavior. What people here are suggesting is that this bug is probably causing an exception, but you are not handling this exception correctly, probably catching it but never doing even a printStackTrace(). This causes the application to fail without you knowing why.
    My suggestion is to run the code from an IDE so you can step through it in debug mode, and see where it is going wrong.

  • Tabbed browsing does not work when i click on (+) or thru file-new tab also?

    When i wish to open a new tab either by clicking mouse over the + sign on the current tab or by file-new tab menu access, tabs are not opened. it works only when clicking on links in present window. earlier i could open tabs at will.

    Disable or uninstall the Ask Toolbar extension, there's a problem with it in Firefox 3.6.13.

  • It will not work in hotmail. clicking just stays same place

    it will take me to hotmail, but once inside the mouse does not work. I got it to work once by downloading adobe flash but it is not now on the sinc list and does work in all other mail locations. gmail I have two both work. Facebook, craigslist except hotmail

    Hi,
    You can try to '''Clear Now''' the '''Cache''', '''Cookies''', and '''Site Preferences''' with '''Time range to clear''' set to '''Everything''' via '''Tools''' ('''Alt''' + '''T''') > [https://support.mozilla.org/en-US/kb/Clear%20Recent%20History Clear Recent History].
    If problems persist, you can Reset Firefox and check.
    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
    Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!

  • Reflection function is not working, unable to click on it at all. Need help! Setting problem?

    Hi all, I seek for your kind expertise advise on my Keynote. Once I've chosen a slide to open, any type of slide at all, my Reflection button or function is unable to be clicked on to perform that function. However, Shadow function facing no problem.
    I can see the Reflection button but it's blurred like not allowing me to click on it at all. Is this cause by some software problem? Or setting problem? iWork has just being installed.
    Appreciate your expert advice and help!

    Thanks Kelly... That's very helpful. Appreciate that very much!
    By the way, if I may ask further, do you know how to how to make the animation like Steve Jobs did during his presentation on Ipad or Ipad2 where the "word" will drop from top onto the centre of the slide with effect or sort of like smoke or dust floating off and dissolved at both sides of the "word"?
    Will be more than grateful to be hear from again! Cheers and thanks again.

  • My igoogle homepage not working when i clicked a mail on the page, nothing were loaded unless I go to main gmail website, help please

    I always access this website as my home page and especially to check my e-mail if available. This site is from google itself and apparently, the GMAIL widget aren't working when I clicked any mail or link inside that widget. I had to go into main GMAIL home page at top of the page link in order to read any available e-mail.
    Please fix this

    In iWeb do Command-Shift-L to see the outline of the page.
    You'll notice that the links are covered by another layer.
    http://www.atlastilellc.com/Atlas_Tile/Marble.html
    Make sure the content is in the layer where it belongs. The buttons with the links are -55pixels into the Header layer.
    Move them down. Open the Inspector > Yellow ruler to see their position.

  • "End contact" not working on first click

    Hello everyone,
    We're currently developing the ICWC in CRM 5.0 with a CLM extension pack.
    We're having a problem with the End Interaction button. The functionality behind it (raising the events, saving transactions, ending the current customer) are all working perfectly, so when End Interaction is pressed, the IC navigates back to the default views and so on.
    And now the problem: the contact information is not cleared from the Contact Information Box in the contextareapage. I already debugged the whole thing for some days now and I'm quite sure that the problem is somewhere with a refresh and maybe at javascript level.
    The context area custom controller display_name and company_name variables are empty, even when the view is loaded (breakpoint in contextareapage.htm) but still the information is shown on the screen. When I play around with other functions in the contextareapage (like pressing back on the history breadcrumb, opening the scratchpad, pressing the end contact button again and so on) makes the contact information dissapear so this makes me think that a javascript refresh function was not called correctly.
    We already replaced quite some views now but we did not touch the contextareapage itself. I debugged the end contact procedure in our Z profile together with the SAP default profile and I don't see ANY difference, all the correct custom controllers are registered for the correct events and so on.
    I already tried to launch some javascript functions from the contextareapage (ic_base_contextarea_scripts.js) like updateCallerInfo(), interactionEnded() but without luck. (I launched the javascripts by placing them in <script> tags on the bupasearch.htm page, this page is called when the interaction is ended)
    Could someone help me on track again?
    I know that the MCM thing is responsible for injecting(?) javascripts in the required pages but don't know how to use it, maybe someone has any info on this?
    Many many thanks in advance,
    Kind regards,
    Joost

    Thanks for your suggestion! Creating a new profile and adding everything step by step was my last resort but I wasn't that desperate yet
    Anyway, just if people would encounter the same problem, I solved the problem by changing the javascript ic_base_contextarea_scripts.js and cleared myself the contact information box variables when the end contact button was clicked.
    I added following lines to the function wsb_handler(event) at the context
    if(value=="End"){
      closeLTXFrames();
      forwardCall(cAppEventCode,cAppEvtReqEndInt,"","","","","","","","","");
      contextArea.ContactDisplay.setContactName( '' );
      contextArea.ContactDisplay.setCompanyName( '' );
      contextArea.ContactDisplay.setContactType( '' ,  '' );
    Kind regards,
    Joost

  • My bookmark feature is not working. I click the star button, and it does the animation showing a bookmark added, but it doesnt turn blue or bookmark page...

    it used to work fine, but now it does.. Some websites will bookmark, but most will not... Like I said in the question, when I click the STAR button it does the little animation showing bookmarking, but it does NOT turn blue, and the page I am trying to bookmark is not showing up in my unsorted bookmarks list or anywhere else.. Thanks for your help..

    You can check for problems with the <b>places.sqlite</b> database file in the Firefox profile folder.
    *http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox
    *https://support.mozilla.org/kb/Bookmarks+not+saved#w_fix-the-bookmarks-file
    *Places Maintenance https://addons.mozilla.org/firefox/addon/places-maintenance/
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
    *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
    *Do NOT click the Reset button on the Safe Mode start window
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • I just upgraded to 6.0 and links that want to open in a new window do not work. Right click and selecting open in new window does work.

    Similarly clicking a link in email does not open a window. I can drag the link to Firefox and a new tab opens.
    Also clicking Tools -> Add-ons does not open a tab as it used to.

    mha007, Thank you. I walked through your suggested solutions and finally disabled all add-ons and restarted them one by one. The culprit seems to be ViewSourceWith 0.8.11. Interestingly when it is enabled I had to go to TaskManager to force Firefox to quit.
    Maybe this information will help others. I don't know if the cache clearing etc helped but I would suggest that others start but Bringing up Firefox in Safe Mode (hold shift when you select the icon), disable all add-ons and then start them one by one.
    Of course if you have ViewSourceWith maybe you should just disable it first rather than go through the tedium of restarting each add-on separately. To get to the add-ons when it won't open from the toolbar type about:addons in the address area.

  • Hyperlinks Not Working After First Click AND Message Editable in Inbox

    Recently, we have noticed some marketing emails we'd sent out are acting weird when we receive them in Apple Mail.
    We are using a reputable email marketing company to send the messages so I assume the formatting should be OK but occasionally the emails we send out:
    1.) Will allow clicking a hyperlink once but not again. By this, I mean you can click on the link and launch the default browser and visit the link but, if you go back to the message and hover over the link, the cursor is an I beam instead of the link cursor.
    2.) The message, while still in the Inbox, is actually editable! This might be the crux of the link issue since, if Mail is authoring a message, it won't allow you to click on a link (but will once the message has been sent and is in the Sent folder.
    Other details:
    a.) The hyperlink cursor will actually fail any time you have clicked inside the message body. So clicking the link the first time counts as clicking inside the message body.
    b.) Closing and reopening the offending message will reset the message so you can click successfully once again.
    c.) If you close the message that is "edited" it will not be saved.
    This is happening on several OS and Mail combinations. (OS 10.5.8 and Mail 3.6, 10.6.4 and Mail 4.3 and 10.6.6 Mail 4.4)
    We've only noticed this on emails that emanate from our email marketing company but it could be happening with others. We were wondering if there is some formatting they use that could cause this or if it's an Apple Mail bug.
    Very hard to diagnose. Any help would be appreciated.

    Sorry, I wasn't clear. Let me clarify: not sure how it could be an Apple Mail preference thing since the problem seems to track certain messages more than anything and the problem appears in at least 3 Mail apps versions on 3 different computers across 3 different operating systems. That would be a pretty coincidental preference anomaly!
    And yes, I said it could be happening with others; the operative word is "could". I didn't mean to imply by "could" that it indeed was. Just didn't want to rule out that possibility.

Maybe you are looking for

  • Hi, can i use a mini dvi male to vga female adaptor for my 2011 mac mini?

    Is a mini dvi the same as a mini display/thunderbolt which my new mac mini has? The monitor is a vga only.

  • Macbook to tv tuner

    I am trying to run my dvi out put through a tuner box for my tv so i can utalize the tvs speakers. It seems that the computer dosnt recognize it as a display tho. It works fine if i go directly into the tv, not going thro box. If i go thro the box i

  • How to transfer files after booting from external drive?

    My fathers MB Air has been failing to boot, most likely due to lack of space on hard drive. I've come to the conclusion seeing as how its a 2014 model and he has 6 GB's of free space on his main dirve. I've managed to boot his MB Air from an external

  • Problem in mapping of conditional tag.

    Hi Experts, I have the following problem: Source tag: <A> <FIELD1>DATUM1</FIELD1> <STATUS> X</STATUS> </A> <A> <FIELD1>DATUM2</FIELD1> <STATUS> </STATUS> </A> <A> <FIELD1>DATUM3</FIELD1> <STATUS> </STATUS> </A> Target Tag: <C> <FIELD1>DATUM1</FIELD1>

  • Help on Lookup API

    Hi,   While I was searching for stuff on Lookup API, I came across the two good blogs talking about different ways to do Lookups. RFC Look up - Use this crazy piece for any RFC Mapping Lookups! RFC lookup with communication channel - The specified it