Problem while displaying the data when double clicked on JTable element

Hi All,
i have one List box( JList ) and one table (JTable). Both JTable and JList are positioned on the same Frame. I am able to drag the elements from JList to JTable and also i have added the mouse click action on both List box and JTable.
if i double click on JList element, that will popup one dialog box.
if i double click on JTable cell element that was dragged from JList, that will popup same dialog box which was opened earlier for JList action.
But my problem here is:
Suppose if i drag the four elements one by one from JList to JTable and (after four elements dragged) double clicked the first element which was dragged first that displayed the popup dialog box structure correctly but the data displayed in that was not correct. It is showing the data of recent dragged element( i.e, fourth element).
But if i double click on JList element that is showing the correct data according to the double clicked element.
What might be the problem here, why it was not displaying the correct data when double clicked on JTable element.
Please help me here.
Many thanks in advance.
The following code is used in mouse clicked event method of JList
private void listMouseClicked(java.awt.event.MouseEvent evt) {                                              
         if(evt.getClickCount()==2){
         AssigningResourcesUI assignResource=new AssigningResourcesUI(this,true);
         assignResource.show();
}                AND The following code is used in mouse click enevet method of JTable.
private void tableMouseClicked(java.awt.event.MouseEvent evt) {                                          
        if(evt.getClickCount()==2){
         int row=table.rowAtPoint(new Point(evt.getX(), evt.getY()));
         int col=table.columnAtPoint(new Point(evt.getX(), evt.getY()));
         if(row==-1||col==-1){
             return;
          Object obj=table.getModel().getValueAt(row, col);
         if(obj==null||(obj.equals(""))){
           }else{
         AssigningResourcesUI assignResource=new AssigningResourcesUI(this,true);
         assignResource.show();
     }            Thanks & Regards,
Maadhav....
Edited by: maadhav on Jul 1, 2009 7:22 AM

I doubt it is related to your problem but:
int row=table.rowAtPoint(new Point(evt.getX(), evt.getY()));Why are you creating a new Point? Just use evt.getPoint().
Object obj=table.getModel().getValueAt(row, col);Don't get the data through the model method, get the data through the table method:
Object obj = table.getValueAt(...)
This way it will work even if the table happens to be sorted.
Instead of creating a AssigningResourcesUI object, just disply the value retrieved from the model. That way you know whether the problem is with the mouse event code or your UI class. Like Walter suggested above I"m guess the problem is with your UI class.

Similar Messages

  • Facing a Problem while downloading the data from ALV Grid to Excel Sheet

    Hi Friends,
    Iam facing a problem while downloading the data from ALV Grid to excel sheet. This is working fine in Development server , when comes to Quality and Production servers I have this trouble.
       I have nearly 11 fields in ALV Grid and out of which one is PO number of length 10 , all the ten numbers are visible in the excel sheet if we download it from development server but when we download it from Quality or Production it is showing only 9 numbers.
    Can any one help me out in this case.

    hi...
    if this problems happens dont display the same internal as u finally got.
    just create new internal table without calling any standard data elements and domains... but the new internal table s similar like ur final internal table and move all the values to new int table.
    for eg.
    ur final internal int table for disp,
         data : begin of itab occur 0,
                        matnr like mara-matnr,
                   end of itab.
    create new like this,
               data : begin of itab occur 0,
                        matnr(12) type N,
                   end of itab.

  • Problem while exporting the data from a report to an excel file.

    Hi SAP guru's,
    I have a problem while exporting the data from a report to an excel file.
    The problem is that after exporting, the excel file seems to have some irrelevant characters....I am checking this using SOST transaction..
    Required text (Russian):
    Операции по счету                                    
    № документа     Тип документа     № учетной записи     Дата документа     Валюта     Сумма, вкл. НДС     Срок оплаты     Описание документа
    Current Text :
       ? 5 @ 0 F 8 8  ? >  A G 5 B C                                   
    !   4 > : C       "" 8 ?  4 > : C      !   C G 5 B = > 9  7 0 ? 8 A 8        0 B 0  4 > : C         0 ; N B 0      ! C <       ! @ > :  > ? ; 0 B K        ? 8 A 0 = 8 5  4 > : C
    Can you help me making configuration settings if any?
    Regards,
    Avinash Raju

    Hi Avinash
    To download  such characteres you need to adjust code page to be used during export. You can review SAP note 73606 to identify which code page is required for this language
    Best regards

  • BI7.0 Hexdecimal values problem while activating the data in DSO

    Hi Friends,
                     I've got the data upto PSA and i've run DTP also from PSA to DSO, but while activating the data in DSO from New Data Table to Active Data Table, it's giving the error given below:
    Error when assigning SID: Action VAL_SID_CONVERT table
      0DOC_HD_TXT     
    Value '1st disb' (hex. '00310073007400200064006900730062') of          characteristic 0DOC_HD_TXT contains invalid characters
    Process 000037 returned with errors.
                it isn't accepting the values like with numberels and chars together
    ex: 1st disb, 70 cr Gen Hsg.
                   I want the same to be in the report, how these are to be allowed?, i don't want to edit in PSA and there are a lot of values like that i can't edit all those, since there are thousands of records.
    Regards,
    BalajiReddy

    Hi Anil,
                       Thanx for your quick replay, i've allowed ',' in RSKC and i've checked the check box LOWER CASE LETTERS for IO 0DOC_HD_TXT, the problem was almost solved out. What does ',' mean by?
                          Why lower case letter has to be checked only for this IO (0DOC_HD_TXT), not for others? if it is checked, it allows only lower cases, doesn't allow upper cases i think. won't there be any problem? if it is done like that?
            pls tell me the reason, i'm really thankfull for your quick replay
    Regards,
    BalajiReddy

  • Problem in displaying the data of columns into rows in sap script

    hi,
    i am working on a sap script and i have to display the dat which is displayed in column into rows but it is not displaying it properly.
    eg, C
        12.1
        Si
        5.5
    it is displaying the data right now like this but i want to display the  data like this:-
    eg, C      Si
        12.1   5.5
    plzzprovide me guidelines how to solve this problem.

    hi,
    i am using this code to display the data:-
    plzz provide me guidelines where i am getting wrong?
    TOPparCOMPONENT DESP,,,,,, INS. LOT #, , , , , , MIC,,,,,,,,,, MIC VALUEparENDTOPparFINAL
    PROTECT
    IF &I_FINAL-PRUEFLOS& NE '000000000000'
    &I_FINAL-MAKTX(23)&&i_final-prueflos(12Z)&
    &I_FINAL-kurztext(25)&
    &I_FINAL-original_input(8)&
    ELSE
    &I_FINAL-MAKTX(23)&     
    &I_FINAL-kurztext(25)&
    &I_FINAL-original_input(8)&
    ENDIF
    ENDPROTECT
    ITEMHEAD
    POSITION WINDOW
    SIZE WIDTH +0 . 4 CH HEIGHT +1 LN
    BOX FRAME 10 TW
    BOX HEIGHT '1.35' LN INTENSITY 20
    IF &PAGE& = '1'
    BOX XPOS '0' CH YPOS '0' CM WIDTH '0' CM HEIGHT '43' LN FRAME '10' TW
    For horizontal line at top
    BOX XPOS '0' CH YPOS '0' CM WIDTH '75' CH HEIGHT '0' LN FRAME '10' TW
    COLUMN LINES...
    END OF COLUMN LINES...
    BOX XPOS '0' CH YPOS '43' LN WIDTH '75' CH HEIGHT '0' LN FRAME '10'TW
    BOX XPOS '75' CH YPOS '0' LN WIDTH '0' CH HEIGHT '43' LN FRAME '10'TW
    ELSE
    COLUMN LINES...
    END OF COLUMN LINES...
    BOX XPOS '0' CH YPOS '0' CM WIDTH '0' CM HEIGHT '47' LN FRAME '10' TW
    BOX XPOS '0' CH YPOS '0' CM WIDTH '75' CH HEIGHT '0' LN FRAME '10' TW
    BOX XPOS '0' CH YPOS '0' CM WIDTH '45' CM HEIGHT '0' LN FRAME '10' TW
    BOX XPOS '20' CH YPOS '0' CM WIDTH '0' CM HEIGHT '47' LN FRAME '10' TW
    BOX XPOS '0' CH YPOS '47' LN WIDTH '75' CH HEIGHT '0' LN FRAME '10'TW
    BOX XPOS '75' CH YPOS '0' LN WIDTH '0' CH HEIGHT '47' LN FRAME '10'TW
    ENDIF
    LINEFEED
    NEWPAGE
    NEW-PAGE
    provide me guidelines to solve this problem.
    Edited by: ricx .s on Mar 13, 2009 5:58 AM

  • Problem while refreshing the data for the second time using excel services in sharepoint 2013...

    Hi,
    I have migrated my Sharepoint from 2010 to 2013.I am able to get the data at the first time of refresh when I click on refresh for the second time I am getting the empty the sheet.
    below find the flow of refresh
    First Refresh
    On Click of refresh open the workbook with excel services and return the session id.
    Using that session I am invoking RefrehAsync method of excel services
    After refresh completed I am setting the calculation of workbook as automatic(to calculate the formulas) using the same session id
    After setting the calculation as Automatic I am setting the calculation type as full(recalculate) using the same session id.
    Now I am able to see the data
    Second Refresh
    After clicking on refresh instead of opening the workbook I am using the session id(already opened workbook) and setting the calculation type as manual
    I am following the same process from refresh(RefreshAsync) as I have followed in first refresh.
    This time my formulas are not getting calculated because of that I am not able to see the data.
    Could you please let me know that am I missing anything here?
    Is this know issue in Sharepoint2013 excel services as same code is working fine with Sharepoint2010.
    If I close the workbook(session id null) and opens(new session id) for all the refreshes it is working and I am able to see the data.
    Thanks,
    Meenakshi Nagpal
    N.Meenakshi

    I am able to see the data for the second refresh  if I change the data source.If I use the same data source which is used in the first refresh I am not getting the data.Excel services will contact the cubes and calculate the formulas in my workbook.
    Could you please let me know what could be the problem at second refresh while contacting the same data source with same session id?
    Please help me asap.
    Thanks,
    Meenakshi Nagpal
    N.Meenakshi

  • Problem with displaying the data from Database on swf file.

    Hi ,
      I am new to flash.Thanks in Advance Please help me....
    Actually my requirement is my application consists a button(submit_Btn) when we click on the button(submit_Btn), each time it must to database(through servlet) and brings the data from database and places it on the flash swf file.Here my problem is for the first time when we click on the button it goes to database and place the data(which was returned from database) on the swf file.Next  when we click on the button for the second time(or anytime) it is not going  and bringing the new data from database(if some data is modified in database or not),Infact it is showing the old data(the data that was collected from previous ClickListener) only on the swf file and it is also not showing any complile time or run time error.
    my Code looks like this:
    submit_Btn.addEventListener(MouseEvent.CLICK,onCheck2);
    function onCheck2(evnt:MouseEvent):void {
    var xmlLoader:URLLoader = new URLLoader();
        var xmlurl:String = "http://localhost:8888/xmlServlet";
        var xmlrequest:URLRequest = new URLRequest(xmlurl);
    xmlLoader.dataFormat = URLLoaderDataFormat.TEXT;
    xmlLoader.addEventListener(Event.COMPLETE, xmlcompleteHandler);
    xmlLoader.load(xmlrequest);
    function xmlcompleteHandler(event:Event):void {
        var loader:URLLoader = URLLoader(event.target);
        var succData:String=loader.data;
            var xmlData:XML = new XML();
            var xmlList:XMLList;
            xmlData = XML(loader.data);
            xmlList = xmlData.children();
            for (var i=0; i<xmlList.length(); i++) {
                for (var n=0; n<xmlData.UserHumanap[i].HumanapDot.length(); n++) {
                        var x_coordinate:Number = xmlData.UserHumanap[i].HumanapDot[n].@x;
                        var y_coordinate:Number = xmlData.UserHumanap[i].HumanapDot[n].@y;
                        var point2:Point = new Point(x_coordinate,y_coordinate);
                        var circle:Sprite = new Sprite();
                        circle.graphics.beginFill(0x00ff00);
                        circle.graphics.drawCircle(point2.x,point2.y,3);   //Placing the data as dots on the swf file
    Thanks in Advance.......Please Help me..........
    its Urgent..........
    Thanks,
    Swarthi

    Checkout following line in your code
    var xmlurl:String = "http://localhost:8888/xmlServlet";
    now change it to
    var xmlurl:String = "http://localhost:8888/xmlServlet?random="+String(MAth.random());
    I think you will get the point now

  • Error in Reading the data when double quote(") is present.

    Hi all,
    We are trying to read the delimited data of below type: using file adapter
    00|ABC   |00|          |ZZ|ABC      |ZZ|               |090914|above data works fine ..but when we have data of the below form:double quote after pipe symbol
    00|"ABC   |00|          |ZZ|ABC      |ZZ|               |090914|
    {code}
    when a double is present at the begininng of the pipe sysmbol the message is getting rejected...but when we have other symbol's like single quote or plus sign  at the beggining the its working fine.
    can anyone help me wat the issue is...im using soa 10.1.3.4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    any help.

  • Can anyone pls. help me : facing problem while fetching the data from BAPI

    Hi all,
        we have installed xMII in a new server. In this new server I am trying to fetch data from a BAPI & write it into a file thru a transaction, but i cant see the data in the tracer, & neither is the file created. But with the same configuration & connection am able to get the data in the old server. Can anyone pls. tell me wat could be the problem?? or is there anything else that we might have forgotten while installing xMII in the new server.
    ur help would be greatly appreciated.
    Thanks,
    Sushma.

    Hi Ravi,
           no am not able to see the table structure also. This is what it is showing in the tracer :
       [INFO ]: Execution Started At: 17:24:17
    [DEBUG]: 00000.03100 Begin Transaction 'TMP99A51958-5BAE-CDE0-0DB5-A3A8C72BC297'
    [DEBUG]: 00000.03100 Begin Sequence Sequence : ()
    [DEBUG]: 00000.03100 Begin Action SAPJCOInterface_0 : (SAP JCO Interface)
    [DEBUG]: 00006.43700 Connection Took 6406 mS
    [DEBUG]: 00009.82800 Function Creation Took 3391 mS
    [DEBUG]: 00010.25000 Execution Took 422 mS
    [DEBUG]: 00010.25000 End Action SAPJCOInterface_0 : (SAP JCO Interface)
    [DEBUG]: 00010.25000 Begin Sequence Sequence_0 : ()
    [DEBUG]: 00010.25000 Begin Action Repeater_0 : (Repeater)
    [DEBUG]: 00010.26600 End Action Repeater_0 : (Repeater)
    [DEBUG]: 00010.26600 End Sequence Sequence_0 : ()
    [DEBUG]: 00010.26600 End Sequence Sequence : ()
    [DEBUG]: 00010.26600 End Transaction 'TMP99A51958-5BAE-CDE0-0DB5-A3A8C72BC297'
    [INFO ]: Execution Completed At: 17:24:28 Elapsed Time was 10235 mS
    I doubt the repeater is not working, becoz i checked the JCO connection & thats fine..
    Thanks,
    Sushma.

  • Problem while writing the data (LSMW direct input method for Creating BOM )

    Hi all ,
    I am unable to create a BOM using LSMW standard dirrect input mehtod .
    While i going through the *Read data *  step , it is reading the data but unable to write the data .
    My input text files are correct , Is it a problem with respect to the Logical Path or Logical File ......
    Please let me know the Possibilities of arising this problem .
    Regards,
    Raj

    Hi,
      Check this document:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90d90895-68dd-2a10-f096-bf8cf2e2f65b
    cheers
    Aveek

  • Problem while downloading the data from servlet across SSL

    Hi All,
    I am trying to download the data with the help of servlet across https.
    The below mentioned settings work fine if the application is on http.
    httpservletresponse.setHeader("Cache-Control", "");
    httpservletresponse.setHeader("pragma", "");
    httpservletresponse.setContentType("application/text");
    httpservletresponse.setHeader("Content-disposition","attachment;filename=Download"+dfileid+".txt");
    But , if the application is on https the above settings is working fine if I am saving the file. But at the same time if I am trying to open I am getting the below error from Internet Explorer.
    "Client( IE ) is trying to search the file from the local machine and showing an alert as listed below"
    Alert from the browser
    'C:\Documents and Settings\chalagen\Local Settings\Temporary Internet Files\Content.IE5\I9FGH0RI\Download196[1].csv' could not be found. Check the spelling of the file name, and verify that the file location is correct
    If you are trying to open the file from your list of most recently used files on the File menu, make sure that the file has not been renamed, moved or deleted.
    I have changed the options of Tools > Internet Options> Advanced > Do not save encrypted pages to disk.
    Please do let me know the solutions for the above problem.
    Waiting for response,
    SonaShree

    hi...
    if this problems happens dont display the same internal as u finally got.
    just create new internal table without calling any standard data elements and domains... but the new internal table s similar like ur final internal table and move all the values to new int table.
    for eg.
    ur final internal int table for disp,
         data : begin of itab occur 0,
                        matnr like mara-matnr,
                   end of itab.
    create new like this,
               data : begin of itab occur 0,
                        matnr(12) type N,
                   end of itab.

  • Problem while loading the data

    Hi Gurus,
    I am facing aproblem in PSA.Acctually the problem is that when we are  loading the data from R/3 to BI side sold to party errors were occured.I edited that error records and manual update done.But in cube manage i find that trasfore records are only 6 which are edited in PSA and added recordrs are 2651.But in that datapacket total records are 3061.
    My cube was rollup also.
    pls give my solution.I'll assigne points.
    Regards
    Roy

    Hi Raj,
    No need to match  datapacket total records to your target.Because depend on the design records are going to change.
    Thnx,
    Assign points if useful.

  • Date problem while loading the data

    Hi Guys,
    When we are extraction the data from the DataSource  0CRM_SALES_ACT_1, it is giving an error for 0calday.
    If the date is greater than 2012, it is giving an error. i.e., it is taking date upto 31.12.2012. If the date is greater than that date is giving an error as "date is later than factory calendar definition".
    In that case we are modifying the date in the PSA and make date less than 2013 and loading the data.
    Even we have done Transfer Global setting at the source system and we checked the factory calendar in SCAL tcode it is setup to 2098.
    Can you please advice how to solve the problem when we are loading the date which is greater than 31.12.2012.
    Thanks in advance
    Jagan

    Hi Jagan,
    In the info package selections tab.
    for 0CALDAY field give to value as 31.12.9999 and try loading you will get all the records
    Regards,
    Venkatesh

  • Problem while uploading the data in IBPI Transaction

    Hi All,
    Here i am processing the (data for IW22)session from sm35, here i am getting error Mallfunction End(Time).
    Anybody can help me in this. It is very urgent.
    Thanks & Regards,
    Venkat N

    Hi
    Even we are facing the same issue and even after we UnProtect the record, the problem persists and we are unable to change or modify record in MDM.
    Temporary solution could be to re-start the MDM services.
    We have also raised a OSS note on the same with SAP, hopefully this will get sorted out.
    Regards
    Navneet

  • Delta Problem while extracting the data by using function module

    Hi Experts,
    I have extracted the data by using Function module, for delta loads I have given Calday and additive delta in Generic delta settings, in BW side I have initialized the data after that I have given delta update option in infopackage and I made process chain also, every day process chain is running successfully but it is showing zero records, but there is a data in Data source (RSA3), means delta is not working.
    What is the problem,
    Is there any another settings for delta loads,
    Please help me to do this,
    Helpful answer will be appreciated with points,
    Regards,
    Venkat

    Hi,
    Try this delta type :NEW STATUS FOR CHANGED RECORDS.
    More information from Nagesh, this information may help
    1. New status for changed Records.
    2. Additive delta.
    New status for changed records means
    New Order
    order no quantity
    1000 10
    order changed to quntity 8. then 2 records will posted 2 BW in first case.
    1000 -10
    1000 8
    if you come to Additve delta.
    for the same case it will send the same record as
    1000 10
    changed records
    1000 -2
    this is the difference. New status with changed records should be used only in association with ODS not cube becoz we don't have overwrite option.
    Additive delta we can use for ODS and Cubes with update mode Addition.
    Regards,
    Satya

Maybe you are looking for

  • Color Laserjet CM2320nf MFP- Is this email legitimate or is it a scam?

    Just received this email yesterday and wanted to know if it is acutally legitimate or is it a phishing attempt to install malware on our printer? URGENT SUPPORT NOTIFICATION FROM HP - PLEASE READ HP LASERJET FIRMWARE UPDATE IS AVAILABLE Dear Valued H

  • Is one application pool preferred for all sharepoint service applications(

    is one application pool preferred for all SharePoint service applications ?  I have a three-tier architected SP 2013 small farm (NLT, 2 wfe, 1 app server, 1 db server). All services will be use (Secure Store,Service Application, Managed Metadata Serv

  • Multiple Coldfusion Development Servers

    Hi: I would like to run multiple development web servers on different ports on the same machine. Is this possible? Is there a simple ui to do this? or will it be complex config file adjustments? Regards: John

  • Can't import layered photoshop files

    In Motion's File Browser all I get is a big white image with an error message saying "This layered photoshop file wasn't saved with a composite image". I have maximum compatibility checked in photoshop (for saving files) which is the ONLY thing in PS

  • How to display word document attched to web template

    Hi, I have attached a word document to a web template in the web app. designer using menu option Web template --> documents. When I use web item "Single document" or "Document list" in my web template this word document does not show up. Did I miss a