How to start a function when double-clicked in a JTable

hi there,
i got a problem, i want that my JTable reacts when i make a double-click on any row... so that i can start a method that does the things i want to...
how can i realize that?
thx anyway
Errraddicator

i got a problem, i want that my JTable reacts when i
make a double-click on any row... so that i can start
a method that does the things i want to...
how can i realize that?Easy, just put a mouse listener on it the same way you would a button! In the listener method, you can use
if ( event.getClickCount()>1 ){
doWhatever();
doug

Similar Messages

  • Previous entered value is lost when double click in the Jtable cell.

    Hi,
    When I double click the cell in the Jtable, the pervious enter data is lost. I unable to mask the double click event also. Could you please help me out.
    Thanks in Advance,
    With Thanks and Regards,
    Shiva

    When I double click the cell in the Jtable, the pervious enter data is lost.No it isn't unless you've customized the code and made an error.
    If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.
    Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.

  • How to get the alv grid report in another screen when double click on basic

    Hi.
    I have created an alv report using class cl_gui_alv_grid.I got another report in the same screen,when double clicked on basic list(using double_click event).I want to get this report in another screen.What i have to do?(In classical reports i worked with sy-lsind = 1 ,but how to do here?)
    How to set color to the selected rows in the alv grid report?I worked with change_data_from_inside method of cl_gui_alv_grid.But it didn't work out..
    With Regards,
    Ramana.

    On double click event . you will have to call another screen say 9000.
    now within screen 900 PBO.. you will have to prepare the fieldcatalog/layout.. and the table to be displayed there.
    in PAI of screen 9000, you can return to the original ALV.
    method double_click.
    call screen 9000.
    endmethod.
    " now in PBO create a module display_alv2
    module display_alv2.
    'prepare the fieldcat/layout info for new alv
    'add the data to the new ALV table
    'instantiate the grid call.. etc
    'call the ALV
    endmodule
    "in PAI
    module exit.
    case sy-ucomm.
    when 'ENT1'.
      leave to screen 0.
    endcase.
    endmodule
    while preparing the field catalog you can mention the EMPHASIZE field, whish will give color to tht column
    E.g
    *--Service Order
        ls_fieldcat-tabname   = 'IT_FINAL_VALID'.
        ls_fieldcat-fieldname = 'AUFNR'.
        ls_fieldcat-scrtext_m = 'Service Order'.
        ls_fieldcat-ref_table = 'AUFK'.
        ls_fieldcat-ref_field = 'AUFNR'.
        ls_fieldcat-col_pos   = 1.
        ls_fieldcat-outputlen = 12.
        ls_fieldcat-emphasize = 'C400'.  "This will add color to the cell
        APPEND ls_fieldcat TO fcat_valid.
    Hope this helps.

  • How does this happen: The picture of recent apps you get when double clicking the home button showed in Settings-Wifi that I had been connected to a network I have not been near for two months. Its not a recent "image" of Settings-Wifi. Can anyone explain

    How does this happen: The picture of recent apps you get when double clicking the home button showed in Settings-Wifi that I had been connected to a network I have not been near for two months. Its not a recent "image" of Settings-Wifi. Can anyone explain?

    Greetings,
    I've never seen this issue, and I handle many iPads, of all versions. WiFi issues are generally local to the WiFi router - they are not all of the same quality, range, immunity to interference, etc. You have distance, building construction, and the biggie - interference.
    At home, I use Apple routers, and have no issues with any of my WiFi enabled devices, computers, mobile devices, etc - even the lowly PeeCees. I have locations where I have Juniper Networks, as well as Aruba, and a few Netgears - all of them work as they should.
    The cheaper routers, Linksys, D-Link, Seimens home units, and many other no name devices have caused issues of various kinds, and even connectivity.
    I have no idea what Starbucks uses, but I always have a good connection, and I go there nearly every morning and get some work done, as well as play.
    You could try changing channels, 2.4 to 5 Gigs, changing locations of the router. I have had to do all of these at one time or another over the many years that I have been a Network Engineer.
    Good Luck - Cheers,
    M.

  • Firefox won't start when double-clicked or when clicked on from the Start menu - but other programs say it IS running.

    When I go to the START Menu to start up Firefox - *or* double-click the Firefox icon on the desktop - the program will *not* start. Yet if I try to do something that may interfere with Firefox, it says to close Firefox down because it's running.... which it isn't. Even going into the Task Manager through *control-alt-delete* shows plainly that Firefox is not running... I downloaded a game through Mediabox.com to watch a movie, that may have started the problem.

    No - I get the message basically saying "Can't run program while Firefox is running. Please close down Firefox & try again".
    I rebooted my computer and it all works now - but that's weird it was happening before. Kinda weirded out that it happened at all.
    To avoid that happening again, I still wanna know what to do to avoid it or fix it for next time. Thanks

  • How to open each CS version file in its proper version program when double-clicked?

    Hello everyone,
    This one is about the coexistence of Indesign CS4 and CS5.
    In my company: I'm working with Indesign CS4, but a colleague is testing CS5 in real day-to-day works, and everyday I come across CS5 files that I need to correct, so I have CS5 installed too. Now, when I boot in the morning, and no Indesign program is open yet, whenever I double-click on an Indesign file, the system will open it with CS5, no matter if the file is CS4 or CS5. I find this quite annoying, of course. I want each version file to get open right away in the proper version of the program. I'd think this is happening to a lot of people, but I've been looking for the issue in the forums and haven't found anything.
    Of course I'm using roundabouts like having my colleague write "_CS5" at the end of each file, put CS4 in my startup items (so that once the program is open, the issue works the other way around and any Indesign file opens just in CS4 when double-clicked…).
    Also, all the Indesign files appear on the desktop as CS5 files
    I would welcome any ideas on the subject, thanks!

    Muchas gracias! really useful. I'm gonna try it.

  • Excel cant find this file when double clicking to open

    Hi,
    Our Imacs 10.8.2 and 10.7.3 joined to windows 2008 domain cant open certain excel files from the network share. When double clicking the file or opening from excel -> file open it says it cant find the file. If I drag the file to the desktop then it will open when double clicked. I have tried disconnecting the network drive and reconnecting. I checked permissions and even tried a few cleaner products such as mac keeper and ccleaner and still the same issue. I even upgraded one of the macs from 10.6.8 to 10.7.3 and the issue persisted. Its very strange as some users can open but others cant. Any insight greatly appreciated.
    Thanks
    Lorne

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    You can use "Disable all add-ons" on the ''Safe mode'' start window.
    You have to close and restart Firefox after each change via "File > Exit" (on Mac: "Firefox > Quit")

  • Wrong file icons - files won't open when double-clicked

    Hello,
    I have a the following problem on a powerbook.
    Most picture files (JPGs, but not bearing the .jpg extension) are not reckognised any more by the system.
    In fact, they bear an icon of Terminal exec (a black square with a green "exec" note in the corner).
    When double-clicked, they don't open in Preview any more, they act as a terminal app, and won't launch, obviously.
    The only way to open them is to go the hard way : in Preview, File menu, Open...
    Another way is to change their names by including the ".jpg" extensions, which seems to wake up the id from the system and place back the correct icon and app link. But we have 1000's of pictures...
    Painful.
    We tried rebuilding OS X desktop, repairing permissions, and update prebinding (using the excellent ToolsX 3.4). No results yet.
    Any idea someone?
    Thanks,
    Powerbook 17 1GHz   Mac OS X (10.4.3)  

    Have you tried selecting a picture, doing command i, for info, then in the info window setting the app for that file as Preview then clicking Change All?
    Does ToolsX have a "Rebuild Launch Services database" function
    or an update for "whatis" and "Locate" databases?

  • How to invoke system editor by double click a file(windows)?

    how to invoke system editor by double click a file(windows)?
    Just like that, double click a file named a.doc, windows will open it by word.exe.

    I try that:
    exec("cmd /c start winword \"c:\dir\a b.doc\"");
    like this posting(http://forum.java.sun.com/thread.jspa?forumID=57&threadID=634576 ), and It is ok.
    But now I make a file list with different files, .pdf,.xls,.doc and so on, I wanna double click to open one with its default system editor.
    if no space:
    exec("cmd /c start " + file);
    will invoke the default editor to open it. if space, it can't do it.
    And now I rename all files, replace space to _.

  • Audio and video don't open together in viewer when double clicked

    Hello everyone!
    I'm having an annoying problem... it isn't something terribly important, but has decreased my work flow speed. Recently, I've had some trouble opening clips from the timeline in the viewer with the double click.
    If I double click the video portion of the clip, even if both the video and two audio tracks are highlighted (and are still linked) only the video portion of the clip will appear (along with "filters" and "motion" tabs) in the viewer, and similarly when double clicking the audio tracks, though both video and audio are highlighted, only the audio tracks and "Filters" tab show up in the viewer. Additionally, once the item is double clicked at the left with the jigsaw pieces that can be used to set video and audio destinations, if I've clicked on an audio portion so only audio shows up in the viewer, only the jigsaw pieces for the two audio tracks (a1, a2) are visible, video track (v1) is no longer present, and vice versa.
    I'd appreciate any advice that you all have! It's really driving me batty, in addition to not knowing what I did to make it that way, I can't figure out how to change it back!
    Heather

    Thanks for the advice.
    The clips already appeared to be linked, and the selection "link" was checked, however when I unlinked and then relinked I found that the audio and video would open up at the same time in the viewer... problem apparently solved! However, the clips I had been working with I had to nudge audio and video a few frames apart (out of sync) to get the audio and video to line up. (gives the little red box with a +or- number in it on the clip).
    When I unlinked and then relinked, the clip lost those red boxes and went back to being synced (as far as FCP is concerned) with the audio and video unaligned.
    So, the problem appears to be coming from when I move the audio and video of a clip out of sync... why is this? Is this something I'm just going to have to deal with?
    Thanks
    H

  • When Double-Clicking In CSS Panel missing in Dreamweaver CC 2014

    Hello,
    Please help me. I not have this option in Edit > Prefrences > CSS Styles > "When Double-Clicking In CSS Panel" in Dreamweaver CC 2014.
    How to show it
    I use windows 8.1

    Use the new CSS Designer Panel.
    Dreamweaver Help | CSS Designer panel
    Nancy O.

  • In my iPhoto library, only some images appear as thumbnails.  The rest are blank but appear briefly when scrolling through or properly when double clicked.  Any ideas?

    In my iPhoto library, only some images appear as thumbnails.  The rest are blank but appear briefly when scrolling through or properly when double clicked.  Any ideas?

    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
    Regards
    TD

  • Error when double clicking rdf file?

    I'm using Reports 10g R2 on Windows XP Pro SP2. When I try to double click on a report file (ANMSC.rdf) the Report Builder starts, but doesn't open the report file. I get the following error:
    Windows cannot find D:\ANMSC.rdf. Make sure you typedthe name correctly, and then try again. To search for a file, click the Start button, and then click Search.
    Also, report files have a generic icon instead of the Oracle Reports icon.
    Does anyone know why Oracle Reports can't open the file when double clicking?

    I'm using Reports 9i and the same happens.

  • How to call jquery function when i close modal dialog box ?

    Hello,
    I need to call one jquery function when I click on close button of modal dialog box.Can anyone please let me know how can I implement it ?
    Thanks,
    Dipti Chhatrapati

    Hi Dipti,
    If my understanding is correct, you are using SP Modal Dialog and want to track the close event of this dialog. Then you may use
    dialogReturnValueCallback parameter of Options variable. Follow is the code sample:
    function ShowModal() {
        ExecuteOrDelayUntilScriptLoaded(function () {
            var options = {
                url: 'page1.aspx',
                tite: 'Add Title',
                width: 800,
                height: 450,
                allowMaximize: true,
                showClose: true,
                dialogReturnValueCallback: scallback
            SP.UI.ModalDialog.showModalDialog(options);
        }, 'sp.js');
     function scallback(dialogResult, returnValue) {
          if (dialogResult == SP.UI.DialogResult.OK) {
               // call your Jquery method here...
    Thanks, Ram

  • When double clicking on alv ,want to get the column name

    Hello there,
        I'm displaying the value of internal table in an alv using Reuse_alv_grid_display method ,using fieldcatalog.I want to know the column name when double clicking on a particular line .If the the fieldname is 'MATNR' then i want to check that column name.
        If anybody have any idea plz terply me.
    Thanking you neon

    for that you have to use the USER_COMMAND event.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       I_CALLBACK_PROGRAM                = sy-repid
       I_CALLBACK_USER_COMMAND      = 'USER_COMMAND'
       IT_FIELDCAT                       = it_fcat
      TABLES
        t_outtab                          = itab
    EXCEPTIONS
       PROGRAM_ERROR                     = 1
       OTHERS                            = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    FORM USER_COMMAND using ucomm type sy-ucomm
                                                   selfield type slis_selfield.
    data: fieldname(30).
    case ucomm.
    when '&IC1'.
    case selfield-fieldname.
       when 'MATNR'.
        message 'clicked on Matnr' type 'I'.
       when 'POSNR'.
       endcase.
    endcase.
    ENDFORM.

Maybe you are looking for

  • Please Help! Unable to create a web service.

    Hi all, I have created a deployable proxy, a EJB with a stateless session bean, and a enterprise application project with the above ejb added. I add the deployable proxy into ejb, so that i can utilize the interface(web service) provided by the exter

  • My Wife's iPod is not recognized by itunes

    My wife has a 30GB ipod and all of a sudden when she connects it to her Dell Laptop it is only recognized as a Store Drive but the itunes never recognized it, she is unable to see her ipod on the itunes. I have restored it by pressing the center butt

  • TAX Deducted @ Sources

    Dear All As SAP provides the standard withholding tax solution on incomming payments. but my problem is that at the time of incomming payment i can't post the withholding tax amount becuase my customer don't provide me the payment detail (Remittance

  • Unable to install twain driver for Epson scanner -- Leopard

    I finally got the printer driver working for my Epson CX6600. Downloaded the correct driver from the Epson website and all is fine. But now my scanner won't work. The CX6600 is an all-in-one. The Twain Scanner Driver was paired up in the same downloa

  • Can't turn off AirPlay and return to iPad audio and video.

    i Have an iPad 3 and 2 AppleTvs in the house. i can't get my ipad to turn off airplay. I'm only able to mirror one of the appletvs or the  dock connector. Attaching a picture to s how my problem. Anyone have an idea to fix it?