JTable.getSelectedRow seems to return wrong index value in J2SDK 1.4

OS version: Microsoft Windows 2000 [Version 5.00.2195]
JDK version: J2RE, Standard Edition (build 1.4.2_07-b05)
I have a pretty simple JTable in which when a user selects a particular value in the first column of a row, the remainder of the columns in that row are populated with text values. The way we tell the JTable which row to populate the column values for is via the getSelectedRow() method. This worked fine using 1.3.1.08. However, when we upgraded to 1.4.2.07, we get an ArrayIndexOutOfBoundsException thrown because for some reason the getSelectedRow method returns the wrong value (e.g. if the user selects the first row, instead of returning an index of 0, the method returns an index of 2, even if there is only 1 row in the table, thus the out-of-bounds). The code has not changed at all -- all we have done is upgrade the version of the JDK. I have seen similar issues on various postings on the web, but these all have to do with removing rows and the like, and having to cancel or stop cell editing before removing the row(s). However, this does not apply in my case, so I think this might be a new bug. Before I post all kinds of code, does anybody know if this is a known bug and/or is there a workaround?
Here is my stack trace:
In Thread[AWT-EventQueue-0,6,main]
caught java.lang.ArrayIndexOutOfBoundsException: 2 >= 2
     at java.util.Vector.elementAt(Vector.java:431)
     at javax.swing.table.DefaultTableModel.setValueAt(DefaultTableModel.java:633)
     at com.sra.kdd.tools.view.NtwrkDefnVW.propertyChange(NtwrkDefnVW.java:475)
     at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:330)
     at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:257)
     at com.sra.kdd.tools.model.NtwrkSourceDSMDL.setDsNM(NtwrkSourceDSMDL.java:298)
     at com.sra.kdd.tools.view.NtwrkCTRL.handleSourceTableEvent(NtwrkCTRL.java:464)
     at com.sra.kdd.tools.view.NtwrkCTRL.tableChanged(NtwrkCTRL.java:120)
     at javax.swing.table.AbstractTableModel.fireTableChanged(AbstractTableModel.java:280)
     at javax.swing.table.AbstractTableModel.fireTableCellUpdated(AbstractTableModel.java:259)
     at javax.swing.table.DefaultTableModel.setValueAt(DefaultTableModel.java:635)
     at javax.swing.JTable.setValueAt(JTable.java:1794)
     at javax.swing.JTable.editingStopped(JTable.java:3167)
     at javax.swing.AbstractCellEditor.fireEditingStopped(AbstractCellEditor.java:124)
     at javax.swing.DefaultCellEditor$EditorDelegate.stopCellEditing(DefaultCellEditor.java:329)
     at javax.swing.DefaultCellEditor$3.stopCellEditing(DefaultCellEditor.java:139)
     at javax.swing.DefaultCellEditor.stopCellEditing(DefaultCellEditor.java:214)
     at javax.swing.DefaultCellEditor$EditorDelegate.actionPerformed(DefaultCellEditor.java:346)
     at javax.swing.JComboBox.fireActionEvent(JComboBox.java:1197)
     at javax.swing.JComboBox.setSelectedItem(JComboBox.java:561)
     at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:597)
     at javax.swing.plaf.basic.BasicComboPopup$ListMouseHandler.mouseReleased(BasicComboPopup.java:749)
     at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:232)
     at java.awt.Component.processMouseEvent(Component.java:5100)
     at javax.swing.plaf.basic.BasicComboPopup$2.processMouseEvent(BasicComboPopup.java:452)
     at java.awt.Component.processEvent(Component.java:4897)
     at java.awt.Container.processEvent(Container.java:1569)
     at java.awt.Component.dispatchEventImpl(Component.java:3615)
     at java.awt.Container.dispatchEventImpl(Container.java:1627)
     at java.awt.Component.dispatchEvent(Component.java:3477)
     at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
     at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
     at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
     at java.awt.Container.dispatchEventImpl(Container.java:1613)
     at java.awt.Window.dispatchEventImpl(Window.java:1606)
     at java.awt.Component.dispatchEvent(Component.java:3477)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
I do have a workaround -- this is definitely not a recommended workaround whatsoever, but it's what I've done just to get by for now, so I thought it might possibly shed some light into the problem. It seems that the index is always off by 2, so I just subtract 2 from the result of getSelectedRow() and then everything works just fine.
Any ideas? Thank you!

If I remember correctly there was a big change in the focus subsystem between JDK1.3 and JDK1.4
Before I post all kinds of code,...Write a 10 line demo program that shows this behaviour. We aren't interested in all kinds of code. If you can't duplicate the problem in 10 lines of code, then the problem is with the rest of your code. So compare you demo code to see why its working and your current code to see why its not working.

Similar Messages

  • SXPG_COMMAND_EXECUTE  return wrong parameter value

    Dear all.
    We have an Abap program that pulls an encrypted FTP file and saves it to our network.
    After that we activate an external command via transaction SM69 by calling FM SXPG_COMMAND_EXECUTE.
    This command is an execution of a batch file that executes a decryption method via PGP decryption software.
    The problem is that we get an output parameter of this FM (STATUS) as u201CEu201D (error) although the decryption is being executed successfully.
    We have the same process being activated same way successfully with another folders (rest is exactly the same).
    Why does SXPG_COMMAND_EXECUTE return wrong status value ?
    Regards,
    Rebeka

    SXPG_COMMAND_EXECUTE runs under certain operating system user account. Looks like that account does not have enough privileges to do what you want it to do. Look at the operating system for privileges (read,write,execute) of the user account SAPServiceuser or equivalent.
    /Simo

  • Why does the cell style index returning wrong CellFormat value when parsing excel cells using OpenXml SDK?

    Consider a General format cell having a value of 39.95. When I fetch the CellFormat of the cell it returns wrong cell format-
    CellFormat thisCellFormat = ((CellFormat)cellFmts.ChildElements[(int)thisCell.StyleIndex.Value]);
    int fmtId = Convert.ToInt32(thisCellFormat.FormatId.Value);
    The value of fmtId returned is 1, and in some cases 38, where it should be 2 or 39.
    This issue is only for General format cells, I am getting correct id for Number format cells.
    Below is the
    Standard ECMA-376 Office Open XML File Formats specified set of implied cell formats for reference-
    ID Format Code
    0 General
    1 0
    2 0.00
    3 #,##0
    4 #,##0.00
    9 0%
    10 0.00%
    11 0.00E+00
    12 # ?/?
    13 # ??/??
    14 mm-dd-yy
    15 d-mmm-yy
    16 d-mmm
    17 mmm-yy
    18 h:mm AM/PM
    19 h:mm:ss AM/PM
    20 h:mm
    21 h:mm:ss
    22 m/d/yy h:mm
    37 #,##0 ;(#,##0)
    38 #,##0 ;Red
    39 #,##0.00;(#,##0.00)
    40 #,##0.00;Red
    45 mm:ss
    46 [h]:mm:ss
    47 mmss.0
    48 ##0.0E+0
    49 @

    The purpose of this forum is to support the Open Specifications documentation. You can read about the Microsoft Open Specifications program here,
    http://www.microsoft.com/openspecifications/en/us/default.aspx
    The library of Open Specification documents is located here,
    http://msdn.microsoft.com/en-us/library/dd208104.aspx
    It doesn’t appear that you are implementing one of the protocols cited.  Your question may be more applicable to MSDN's Microsoft Office for Developers/Open XML Format SDK forum at
    https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=oxmlsdk
    Bryan S. Burgin Senior Escalation Engineer Microsoft Protocol Open Specifications Team

  • FM returns wrong total value for Limit type PO's

    Hi all,
    I am working on SRM 5.0 (SP13) ECS.
    I have implemented the BADI "BBP_WFL_APPROVAL_BADI" for determining the Approvers for PO whenevr a PO is changed.If the diference between the Old PO value and new PO value is > 1000 and the approval text field(custom text under "Documents" link) is set to "YES",then the WF approval is required and the approvers are determined.
    The above logic works fine for the Standard type PO's where the difference between the old value and new value is determined using FM "BBP_PD_PO_GETDETAIL"  by passing the GUID (for the change version and the active vesion) obtained at runtime in the BADI.
    However for the limit type PO's,whenevr I change the total value for the Limit item,I see that the FM "BBP_PD_PO_GETDETAIL" doesnt return the changed value but  always returns blank!
    Bcause I need to check bth the values i.e. Custom text set to "YES" as well as Total value diff ,I cant use the start conditions in tcode SWB_COND.ALso I need to fetch the approvers based on the price diff so I need this value at runtime in the BADI using the FM "BBP_PD_PO_GETDETAIL".
    Please advise why the FM is not returning the changed values for the Limit type PO and is there any other way(other table/FM) to get the changed value at runtime for the LIMIT type PO.
    Thanks for your time.
    Edited by: Rads1234 on Nov 18, 2010 4:39 AM

    Thanks for the rpely.
    Yes.I am using the GUID available at runtime in the  BADI "BBP_WFL_APPROV_BADI" which is the current change version GUID.I tried using that GUID to get the data from both FM as well as CDHDR and CDPOS tables.
    I think this is something related to LImit type PO because for Standard type PO's the FM returns the corretc changed value (as in the screen) for the change version GUID.I fail to understand why the changed values are shwon on the screen but are not stored anywhere in the system before actually ordering the PO!

  • MONTHS_BETWEEN function returns 'wrong' negative values ???

    Hi,
    I can't figure out why these values are results.
    SQL> select months_between(to_date('02-FEB-13','DD-MON-RR'), to_date('28-FEB-13','DD-MON-RR')) from dual;
    MONTHS_BETWEEN(TO_DATE('02-FEB-13','DD-MON-RR'),TO_DATE('28-FEB-13','DD-MON-RR')
                                                                         -.83870968
    SQL> select months_between(to_date('02-FEB-13','DD-MON-RR'), to_date('01-APR-13','DD-MON-RR')) from dual;
    MONTHS_BETWEEN(TO_DATE('02-FEB-13','DD-MON-RR'),TO_DATE('01-APR-13','DD-MON-RR')
                                                                         -1.9677419
    SQL> select months_between(to_date('02-FEB-13','DD-MON-RR'), to_date('02-APR-13','DD-MON-RR')) from dual;
    MONTHS_BETWEEN(TO_DATE('02-FEB-13','DD-MON-RR'),TO_DATE('02-APR-13','DD-MON-RR')
                                                                                 -2

    Hi,
    it could be worth also to mention a specific behavior of MONTHS_BETWEEN.
    In case the 2 dates are on the same day on different month, the time portion is not considered and result is always an integer.
    When the 2 dates are on different days then also the time portion in considered and the result is changing.
    Here is an example:
    alter session set nls_date_format='DD-MON-YYYY HH24:MI:SS';
    select to_date('01-MAY-2013','dd-MON-yyyy') start_dt
         , to_date('31-MAY-2013','dd-MON-yyyy')+(level-1)*6/24 end_dt
         , months_between(to_date('01-MAY-2013','dd-MON-yyyy'), to_date('31-MAY-2013','dd-MON-yyyy')+(level-1)*6/24) diff
      from dual
    connect by level <= 10
    START_DT               END_DT                       DIFF
    01-MAY-2013 00:00:00   31-MAY-2013 00:00:00   -0.9677419
    01-MAY-2013 00:00:00   31-MAY-2013 06:00:00   -0.9758065
    01-MAY-2013 00:00:00   31-MAY-2013 12:00:00   -0.9838710
    01-MAY-2013 00:00:00   31-MAY-2013 18:00:00   -0.9919355
    01-MAY-2013 00:00:00   01-JUN-2013 00:00:00           -1
    01-MAY-2013 00:00:00   01-JUN-2013 06:00:00           -1
    01-MAY-2013 00:00:00   01-JUN-2013 12:00:00           -1
    01-MAY-2013 00:00:00   01-JUN-2013 18:00:00           -1
    01-MAY-2013 00:00:00   02-JUN-2013 00:00:00   -1.0322581
    01-MAY-2013 00:00:00   02-JUN-2013 06:00:00   -1.0403226
    Regards.
    Alberto

  • MONTHS_BETWEEN function returning wrong negative values

    Hello all,
    The following is the query I am puzzling over:
    select to_char(sysdate,'dd-MON-yyyy') AS TODAY, TO_CHAR(HYPOTHETICAL_DATE, 'dd-MON-yyyy') AS HYPOTHETICAL_DATE,
    months_between(sysdate,HYPOTHETICAL_DATE) AS DIFF_IN_MONTHS from TableX
    My result is:
    TODAY HYPOTHETICAL_DATE DIFF_IN_MONTHS
    21-MAR-2012     10-JUL-2020     -99,63109505675029868578255675029868578256
    I am puzzled since in this case since the 2nd date is 8 years down the line my difference should be -8 and a fraction. So why am I getting -99?
    Furthermore I would like to ignore the fractional part so the result I want for the above data is -8.
    Please help.
    Thanks
    S. BASU

    The name of the function is MONTHS_BETWEEN and not YEARS_BETWEEN. So the result is correct!
    Perhaps you are looking for something like:
    select trunc(months_between(sysdate,to_date('10.07.2020'))/12) from dual;or
    select round(months_between(sysdate,to_date('10.07.2020'))/12) from dual;TRUNC cuts the fraction and ROUND rounds it. For example it would be a difference for -8.7.
    Edited by: hm on 21.03.2012 02:42

  • Help to search for a string value and return the index in the arraylist

    Hello,
    I just start java programming for the last three weeks and I cannot find a solution for this problem. I have the following List with string and integer value as shown below:
    List<Empl> list= new ArrayList<Empl>();
         list.add(new Empl(1,"Jim", "Balu",88);
         list.add(new Empl(3,"Bob", "Howards",2);
         list.add(new Empl(2,"Chris", "Hup",8);
    I have no problem of sorting this arraylist either by firstname or lastname. However, I cannot think of a way to search for a firstname or lastname and returing the whole row. I do not want to use index since I am asking user to enter the name to search. Here is my code to search for an empl based on index.
    System.out.print("Please enter index to search or (q)uit: ");
              String ans = sc.next();
              System.out.println();
              int ians = Integer(ans);
              if (ans.equalsIgnoreCase("q"))
                        choice = "n";
              else
              System.out.println("index " + list.get(ians)); //this will print out the whole row based on the index
    Since the user will never seen the contents of the arraylist, is there a way that I can search by string last/first name and will get the index location in int if the result is met?
    Please advice and thank you.
    Bob.

    user11191663 wrote:
    Since the user will never seen the contents of the arraylist, is there a way that I can search by string last/first name and will get the index location in int if the result is met?Another possibility is to set up an ArrayList for each thing you want to search on and then every time you add an employee, add the piece of data you want as well, viz:
    Empl e = new Empl(1,"Jim", "Balu",88);
    list.add(e);
    firstNames.add(e.firstName());As long as you always add them in the same order, the indexes will match, so you could do something like
    ians = firstNames.indexOf(nameToFind);to return the index of the name, if it's there (if not, it will return -1).
    I wouldn't recommend this as standard practise, but it should be OK for the level you're at.
    NOTE: indexOf() returns the index of the FIRST matching item. You may want to think about what you want to do if there are more than 1.
    Winston

  • Statvfs returns wrong values

    Hi,
    I am developing a program the will check for disk space (used,blocks, available ...) and i am using the statvfs.h file.
    When tested with small capacity disks (~5G) it works fine (compared to df -k).
    When tested with large capacity disks (~400G) it returns wrong values(compared to df -k).
    I am using f_bavail and i am casting from fsblkcnt_t to integer/long.
    Please help.
    Thanx R.

    Thanks for your answer.
    I have discovered that it (statvfs.h) doe's not work with vxfs, only with ufs.
    I am using Veritas Cluster Server.
    Any chance of an answer ??
    thanks,
    R.

  • SELECT MAX(field) / SELECT MIN(field) return wrong values

    Hi,
    I have the query:
    Select 
        MAX(b1.time_s) as time_s 
    From
        BUSINESS_INVOCATIONS b1 
    Where
        b1.time_s >= 1219217034000 
        AND  b1.rec_sess_id = 2197756621378027521 
        AND  b1.comp_id IN  ( Select id  From J2EE_CONFIGURATION_BEAN  Where j2eeApplicationsTableId = 378302371920347137 )
    This return the MAX value of the comp_id and not the MAX value of the b1.time_s
    looks like there is a BUG in MAXDB when i have a join of two tables the MAX/MIN functions works on the wrong fields!
    If i change the query to be:
    Select 
        max(b1.time_s) as time_s 
    From
        BUSINESS_INVOCATIONS b1,
        J2EE_CONFIGURATION_BEAN jcb
    Where
        b1.time_s >= 1219217034000 
        AND  b1.rec_sess_id = 2197756621378027521
        AND jcb.j2eeApplicationsTableId = 378302371920347137
        AND  b1.comp_id = jcb.id
    The MIN/MAX functions works good and return the right value
    Pleasehelp me to find what is the problem and if any one already have a solution.
    Thanks,
    Yosef

    Dta for BUSINESS_INVOCATIONS tabel:
    ID,CLASS_TYPE,M_TIME,FUNCTIONENTRYID,TOP_PARENT,START_TIME,TIME_S,COMP_ID,REC_SESS_ID,PARENT,HTTP_SESSION,INVOCATION_HASH_CODE,MINOR_INVOCATION,TRANSACTION_ID,USER_TRACING_COOKIE,TRACINGTYPE
    2089670230321135617,H,1219738865499,1387108688451338241,2089670230321135617,1219217053734,1219217053734,414331168939311111,2197756621378027521,(null),2179742222868545537,-1238173181,GET,null,null,-1
    2089670230321135618,H,1219738865499,1387108688451338242,2089670230321135618,1219217071156,1219217071156,414331168939311108,2197756621378027521,(null),2179742222868545538,-628203986,GET,null,null,-1
    2089670230321135619,H,1219738865499,1387108688451338279,2089670230321135619,1219217073531,1219217073531,414331168939311112,2197756621378027521,(null),2179742222868545538,545948335,GET,null,null,-1
    2089670230321135620,H,1219738865499,1387108688451338284,2089670230321135620,1219217075671,1219217075671,414331168939311119,2197756621378027521,(null),2179742222868545538,1958406838,GET,null,null,-1
    2089670230321135621,H,1219738865499,1387108688451338289,2089670230321135621,1219217077359,1219217077359,414331168939311106,2197756621378027521,(null),2179742222868545538,-2089005650,GET,null,null,-1
    2089670230321135622,H,1219738865499,1387108688451338292,2089670230321135622,1219218442312,1219218442312,414331168939311115,2197756621378027521,(null),2179742222868545538,-1298180580,GET,null,null,-1
    2089670230321135623,H,1219738865499,1387108688451338297,2089670230321135623,1219218467765,1219218467765,414331168939311107,2197756621378027521,(null),2179742222868545538,1318337921,GET,null,null,-1
    2107684628830617601,E,1219738865515,1387108688451338244,2089670230321135618,1219217071171,1219217071171,324259176391901185,2197756621378027521,2089670230321135618,2179742222868545538,586868856,(null),(null),(null),-1
    2107684628830617602,E,1219738865515,1387108688451338281,2089670230321135619,1219217073531,1219217073531,324259176391901185,2197756621378027521,2089670230321135619,2179742222868545538,1886325459,(null),(null),(null),-1
    2107684628830617603,E,1219738865515,1387108688451338286,2089670230321135620,1219217075671,1219217075671,324259176391901185,2197756621378027521,2089670230321135620,2179742222868545538,-550916224,(null),(null),(null),-1
    2107684628830617604,E,1219738865515,1387108688451338291,2089670230321135621,1219217077359,1219217077359,324259176391901185,2197756621378027521,2089670230321135621,2179742222868545538,1676270392,(null),(null),(null),-1
    2107684628830617605,E,1219738865515,1387108688451338294,2089670230321135622,1219218442312,1219218442312,324259176391901185,2197756621378027521,2089670230321135622,2179742222868545538,-2074647744,(null),(null),(null),-1
    2107684628830617606,E,1219738865515,1387108688451338299,2089670230321135623,1219218467765,1219218467765,324259176391901185,2197756621378027521,2089670230321135623,2179742222868545538,63795915,(null),(null),(null),-1
    3278620531946946561,T,1219738865483,1387108688451338291,2089670230321135621,1219217077359,1219217077359,2828260569209896968,2197756621378027521,2107684628830617604,2179742222868545538,-1511714853,java.lang.ArithmeticException,(null),(null),18
    Daa for J2EE_CONFIGURATION_BEAN Table:
    select * from IDENTIFY.J2EE_CONFIGURATION_BEAN
    ID,J2EEAPPLICATIONSTABLEID,J2EEAPPLICATIONID,J2EECOMPONENTID
    180144094616485889,0,0,0
    180144094616485890,0,0,0
    180144094616485891,0,0,0
    180144094616485892,0,0,0
    180144094616485893,378302478220787713,0,0
    180144094616485894,0,0,0
    306244884182859777,378302478220787713,360288079711305731,306244884182859777
    324259282692341761,378302478220787713,360288079711305731,306244884182859777
    360288079711305729,378302478220787713,360288079711305729,0
    360288079711305730,378302478220787713,360288079711305730,0
    360288079711305731,378302478220787713,360288079711305731,0
    360288079711305732,378302478220787713,360288079711305732,0
    360288079711305733,378302478220787713,360288079711305733,0
    360288079711305734,378302478220787713,360288079711305734,0
    414331275239751681,378302478220787713,360288079711305731,594475260334571522
    414331275239751682,378302478220787713,360288079711305731,594475260334571522
    414331275239751683,378302478220787713,360288079711305731,594475260334571522
    414331275239751684,378302478220787713,360288079711305731,594475260334571522
    414331275239751685,378302478220787713,360288079711305731,594475260334571522
    414331275239751686,378302478220787713,360288079711305731,594475260334571522
    414331275239751687,378302478220787713,360288079711305731,594475260334571522
    414331275239751688,378302478220787713,360288079711305731,594475260334571522
    414331275239751689,378302478220787713,360288079711305731,594475260334571522
    414331275239751690,378302478220787713,360288079711305731,594475260334571522
    414331275239751691,378302478220787713,360288079711305731,594475260334571522
    414331275239751692,378302478220787713,360288079711305731,594475260334571522
    414331275239751693,378302478220787713,360288079711305731,594475260334571522
    414331275239751694,378302478220787713,360288079711305731,594475260334571522
    414331275239751695,378302478220787713,360288079711305731,594475260334571522
    540432064806125569,378302478220787713,360288079711305732,594475260334571523
    540432064806125570,378302478220787713,360288079711305732,594475260334571523
    540432064806125571,378302478220787713,360288079711305732,594475260334571523
    540432064806125572,378302478220787713,360288079711305732,594475260334571523
    540432064806125573,378302478220787713,360288079711305732,594475260334571523
    540432064806125574,378302478220787713,360288079711305732,594475260334571523
    540432064806125575,378302478220787713,360288079711305734,594475260334571524
    540432064806125576,378302478220787713,360288079711305734,594475260334571524
    576460861825089537,378302478220787713,360288079711305730,576460861825089537
    576460861825089538,378302478220787713,360288079711305731,576460861825089538
    576460861825089539,378302478220787713,360288079711305732,576460861825089539
    576460861825089540,378302478220787713,360288079711305733,576460861825089540
    576460861825089541,378302478220787713,360288079711305734,576460861825089541
    594475260334571521,378302478220787713,360288079711305729,594475260334571521
    594475260334571522,378302478220787713,360288079711305731,594475260334571522
    594475260334571523,378302478220787713,360288079711305732,594475260334571523
    594475260334571524,378302478220787713,360288079711305734,594475260334571524
    2810246277000855553,378302478220787713,360288079711305729,2810246277000855553
    2810246277000855554,378302478220787713,360288079711305729,2810246277000855554
    2810246277000855555,378302478220787713,360288079711305729,2810246277000855555
    2810246277000855556,378302478220787713,360288079711305729,2810246277000855556
    2810246277000855557,378302478220787713,360288079711305729,2810246277000855557
    2810246277000855558,378302478220787713,360288079711305729,2810246277000855558
    2810246277000855559,378302478220787713,360288079711305729,2810246277000855559
    2828260675510337537,378302478220787713,360288079711305729,2846275074019819521
    2828260675510337538,378302478220787713,360288079711305729,2846275074019819521
    2828260675510337539,378302478220787713,360288079711305729,2846275074019819521
    2828260675510337540,378302478220787713,360288079711305729,2846275074019819521
    2828260675510337541,378302478220787713,360288079711305729,2846275074019819521
    2828260675510337542,378302478220787713,360288079711305729,2846275074019819521
    2828260675510337543,378302478220787713,360288079711305729,2846275074019819521
    2828260675510337544,378302478220787713,360288079711305729,2846275074019819521
    2828260675510337545,378302478220787713,360288079711305729,2846275074019819521
    2828260675510337546,378302478220787713,360288079711305729,2846275074019819521
    2828260675510337547,378302478220787713,360288079711305729,2846275074019819521
    2828260675510337548,378302478220787713,360288079711305729,2846275074019819521
    2828260675510337549,378302478220787713,360288079711305729,2846275074019819521
    2828260675510337550,378302478220787713,360288079711305729,2846275074019819521
    2828260675510337551,378302478220787713,360288079711305729,2846275074019819521
    2828260675510337552,378302478220787713,360288079711305729,2846275074019819521
    2846275074019819521,378302478220787713,360288079711305729,2846275074019819521
    3152519848681013249,378302478220787713,360288079711305729,3152519848681013249
    3152519848681013250,378302478220787713,360288079711305730,3152519848681013250
    3152519848681013251,378302478220787713,360288079711305731,3152519848681013251
    3152519848681013252,378302478220787713,360288079711305732,3152519848681013252
    3152519848681013253,378302478220787713,360288079711305733,3152519848681013253
    3152519848681013254,378302478220787713,360288079711305734,3152519848681013254
    3170534138742571009,0,0,0
    3170534138742571010,0,0,0
    3170534247190495233,0,0,0
    3170534247190495234,0,0,0
    3602879811418062849,378302478220787713,360288079711305729,594475260334571521
    Hope this will help:)
    Thanks,
    Yosef

  • On Firefox stage.stageWidth stage.stageHeight return wrong values

    Hello,
    I have a problem on firefox windows 8, stage.stageWidth and stage.stageHeight return wrong values,
    swfobject.embedSWF("mySwf.swf", "mySwf", "500", "500", "14.0.0","expressInstall.swf", flashvars, params, attributes);
    on ie, Chrome stage.stageWidth and stage.stageHeight return 500
    on iFirefox stage.stageWidth and stage.stageHeight return 750 and my animation is smaller (66%)
    Thanks

    In order to target iPhone 5 you need to use AIR 3.5 beta or AIR 3.4
    pointing to iOS 6 SDK. Be sure to include the [email protected] to
    trigger the iPhone 5 size. In other words, the app has to be built
    targeting the iOS 6 SDK and have the new default png to trigger the full
    size on the iPhone 5.
    AIR 3.5 beta includes the bits that to target iOS 6 SDK, but you can
    target iOS 6 with AIR 3.4 by using the external SDK path in the package
    ANE prompt in FB 4.6
    http://labs.adobe.com
    iBrent

  • ObjectInputStream returns a wrong boolean value of a object

    ObjectOutputStream.writeObject once, then change the boolean value of the Contact object, ObjectOutputStream.writeObject again, but when ObjectInputStream.readObject, it returns SAME boolean values which should be different. can somebody explain me this? please. thx
       1. import java.io.*; 
       2. import java.util.*; 
       3.  
       4. public class TestSerializable { 
       5.      
       6.     /** Creates a new instance of TestSerializable */ 
       7.     public static void main(String args[]){ 
       8.         new TestSerializable(); 
       9.     } 
      10.      
      11.     public TestSerializable() { 
      12.         try{ 
      13.             Contact contact = new Contact("email","group",1); // contact.isOnline = true for default; 
      14.              
      15.             FileOutputStream fos = new FileOutputStream("ser"); 
      16.             ObjectOutputStream oos = new ObjectOutputStream(fos); 
      17.  
      18.             oos.writeObject(contact); 
      19.              
      20.             contact.setOnline(false); 
      21.             oos.writeObject(contact); 
      22.  
      23.             oos.flush(); 
      24.  
      25.              
      26.             FileInputStream fis = new FileInputStream("ser"); 
      27.             ObjectInputStream ois = new ObjectInputStream(fis); 
      28.             Contact ccRead1 = (Contact)ois.readObject(); 
      29.             Contact ccRead2 = (Contact)ois.readObject(); 
      30.              
      31.             System.out.println("ccRead1.isOnline() = "+ccRead1.isOnline()); 
    [u]  32.             System.out.println("ccRead2.isOnline() = "+ccRead2.isOnline() + " which should be FALSE. ERROR");  [/u]
      33.                        
      34.             oos.close(); 
      35.             ois.close(); 
      36.              
      37.         } 
      38.         catch(Exception e){ 
      39.             e.printStackTrace(); 
      40.         } 
      41.          
      42.     } 
      43.      
      44. } 
      45.  
      46.  
      47.  
      48.  
      49.  
      50. import javax.swing.tree.DefaultMutableTreeNode; 
      51. import javax.swing.tree.*; 
      52. import java.util.*; 
      53.  
      54. public class Contact extends DefaultMutableTreeNode { 
      55.      
      56.     private String email; 
      57.     private int arrayIndex; 
      58.     private String group; 
      59.     private boolean online; 
      60.      
      61.   
      62.     public Contact(String email,String group,int arrayIndex, boolean online){ 
      63.         this.email = email; 
      64.         this.group = group; 
      65.         this.setArrayIndex(arrayIndex); 
      66.         this.setOnline(online); 
      67.         this.setUserObject(this); 
      68.         this.setAllowsChildren(false);         
      69.     } 
      70.      
      71.     public Contact(String email, String group){ 
      72.         this(email,group,-1,false); 
      73.     } 
      74.      
      75.     public Contact(String email, String group, int arrayIndex){ 
      76.         this(email,group,arrayIndex,true); 
      77.     } 
      78.      
      79.  
      80.      
      81.     public String toString(){ 
      82.         return this.email; 
      83.     } 
      84.  
      85.     public String getEmail() { 
      86.         return email; 
      87.     } 
      88.  
      89.     public int getArrayIndex() { 
      90.         return arrayIndex; 
      91.     } 
      92.  
      93.     public String getGroup() { 
      94.         return group; 
      95.     } 
      96.  
      97.     public boolean isOnline() { 
      98.         return online; 
      99.     } 
    100.  
    101.     public void setOnline(boolean online) { 
    102.         this.online = online; 
    103.     } 
    104.  
    105.     public void setArrayIndex(int arrayIndex) { 
    106.         this.arrayIndex = arrayIndex; 
    107.     } 
    108.  
    109.      
    110. } 

    Did you try the reset() technique again?
    You could also have a look at ObjectOutputStream.writeUnshared().
    And it's not returning a 'wrong value', it is conserving the object graph of the original object sent, which is what it's specified to do and what it's supposed to do. If you don't want that behaviour use reset() or writeUnshared().

  • When orientation change and soft keyboard is activated, return wrong value

    Hello,
    in a View, when the orientation change and the soft keyboard is activated, this.navigator.height return wrong value.
    systemManager.stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, orientationChangeHandler);
    public function orientationChangeHandler(event:StageOrientationEvent):void {
    inp.text=String(this.navigator.height);
    thanks.

    Can you attach a simple sample application that demonstrates this?  What device are you seeing this issue on?

  • JckechBox into JTable -- getselectedrow

    I have a problem with Checkbox into JTable
    My table has checkbox into first column. If I select checkbox, the program open a new JPanel. To do this I have associated an ActionListener to CheckBox that seems to work fine. This is the related code:
    public class AbstractAction implements ActionListener{            
         private static final long serialVersionUID = 1L;     
        public void actionPerformed(ActionEvent evt) {
            JCheckBox cb = (JCheckBox)evt.getSource();
            alarm_NOack_table.getSelectedRow()
            boolean isSel = cb.isSelected();
            if (isSel) {
        } else {
       };As you can see, in the listener I need to know the row number in which there is the selected checkbox, but alarm_NOack_table.getSelectedRow() return always '-1'.
    How can I do?
    Thanks in advance
    Palmis

    hey!!!
    you will have to use TableModelListener
    if you have a look at API
    getSelectedRow()
    Returns the index of the first selected row, -1 if no row is selected.
    it says that only when row is selected. but clicking your check box does not select the whole row. so you need to listen for changes in the table itself. the best would be to write your own table model (extension of AbstractTableModel)
    this is how you should be able to get the change a your row where the change occurred
    public class YourClass implements TableModelListener{
    yourTable.getModel().addTableModelListener(this);
    public void tableChanged(TableModelEvent tme){
              int row = tme.getFirstRow();
              int col = tme.getColumn();
    //if you want your table model then do this
    TableModel tm = (TableModel)tme.getSource();
    }and now you should have the row a column where the change has occurred and that's it
    hope this will help
    v.v.

  • JTable getSelectedRows

    Hi,
    I have to select rows in a jTable in order to manipulate the data. I have the following code:
    int [] selected = tblReport.getSelectedRows();
           int amount = 0;
            for (int i = 0 ; i < selected.length ; i++){
                amount += (Integer.parseInt("" + tblReport.getValueAt(i, 6)));
        txtAmount.setText("" + amount); 
        txtAmount.setEditable(true);
        txtAmount.selectAll();For some reason it always start counting for row 0, and add the amount of the following rows - according to the number of rows selected, instead of starting from the 1st selected row.
    I tested the code with "countSelectedRows()", and as long as the selected rows were consecutive - I got the correct count, however, if I had a non selected row in the middle the count came wrong. I also tested with getSelectedRow() and got the correct index of the 1st selected row, but the amount was always from row 0 of the table down...
    Am I using the wrong method?
    Thanks

    Thanks Jaspre, that solved the problem. Changed the code to be:
    int [] selected = tblReport.getSelectedRows();
        if(selected.length > 0){
            payTo = "DKT";
            pnlPayment.setVisible(true);
            int amount = 0;
                for (int i = 0 ; i < selected.length ; i++){
                    amount += (Integer.parseInt("" + tblReport.getValueAt(selected, 6)));
    txtAmount.setText("" + amount);
    txtAmount.setEditable(true);
    txtAmount.requestFocusInWindow();
    txtAmount.selectAll();
    }else{
    JOptionPane.showMessageDialog(null, "Please select docket(s) to be paid");

  • How to use cfloop index value as part of another variable

    Hello,
    I have a RATE form that first asks "how many rates will you
    be adding?" that answer generates a series of form elements based
    on the answer. You then have a form grid to populate, 3 values for
    each rate (price, code, name).
    This part works fine. The issue is now I need to INSERT the
    values into the table, so I need to use the INDEX value of the
    cfloop to recreate the amount (and names) of the fields in the
    INSERT statement. How do I escape, or re-create the evaluated form
    elements ( in which their count is #i# as the loop goes) when I
    need to evaluate for #i# AND evaluate for #form.sku_i_name# at the
    same pass?
    I am passing, for example, #form.sku_2_Name# where that might
    equal "Half Page". The number 2 in that variable was assigned
    during the form creation by the current index of a cfloop. Since my
    action (insert) page does not know how many (out of 50 possible)
    sku's are coming, how do I use the skuCount (another hidden value
    passed as well) to create a proper INSERT SQL command when I need
    to eval the form element and the index at the same time?
    Obviously #sku_#i#_Name# does not work, and #sku_i_Name# does
    not either... I know this can be done, and that I am just doing it
    wrong.
    Thanks for any help!

    bigbrain28 wrote:
    > Thank You, cfsearching! I don't quite understand 100%
    how it works
    As all three of us indicated you use array notation for this
    type of
    requirement. In ColdFusion you can use array notation or dot
    notation
    to access structure data. Almost all data in ColdFusion is
    now some
    type of structure.
    I.E. #Form['myField']# is the same as #Form.myField#.
    The advantage is that with array notation you can do things
    you can not
    do with dot notation. You can reference elements that have
    keys that
    are illegal variable names such as one with a space.
    I.E. #url['my field'] is allowed, #url.my field# would fail
    or course.
    And you can concatenate the key string as we did with your
    example.
    I.E. #Form['aString' & aVariable]#
    There are many powerful things one can do with this
    knowledge. One can
    access record sets with array notations. This can allow for
    very
    sophisticated parsing of a record set.
    I.E. #myQuery['column'][row]#
    You can dynamical call a variable. Thus creating dynamic code
    that does
    not even need to know what variables exist until run time.
    I.E. #variables[anyName]#
    This just scratches the surface.

Maybe you are looking for

  • TableFileterDemo - ignore case

    I have implemented the code from the java tutorials "TableFilterDemo" into some of my code and have it working. I was trying to tweak it a bit to have it ignore the case when you enter text to filter for. I took a look at the String class and the equ

  • My husband updated his phone and i synced my phone. Now his apps and music load to my phone. Even my itunes login is on his phone now :

    Hopefully someone can shed some light to this confused iphone/itunes user. I'm not a super smart person when it comes to programs, so please keep it simple for me. Step by step would be great!!  I updated my iphone 4 in October 2011, my husband howev

  • BT Yahoo Home Page access

    Now that the Bt Yahoo login has now changed to BT.com I have lost access to my old BT Yahoo home page. This was a useful home page which was customisable with feeds etc. Now it just re-directs to the BT.com portal home page instead. Is there any way

  • Legends in Charts

    I am facing problem in displaying the legend in chart.It is not showing up all the legend lables. we are using jcschart110K.jar Please help me in this regard.

  • Interactive Reporting & Imported CSV File

    I have a query that joins an IR result set w/ a CSV file that I've imported into IR. I would like to import a more current version of that CSV file (I can use the same file name each time) without having to update the query, is that possible? I tried