sizeColumnsToFit(boolean) no longer works in JDK1.3

XMLWordPrintable


      My customer is using the sizeColumnsToFit(boolean lastColumnOnly) API in their
      Applet. The method works fine using jdk1.2.2 but with jdk1.3 an exception
      is thrown:

      java.lang.ArrayIndexOutOfBoundsException: 3 >= 2
      at java.util.Vector.elementAt(Unknown Source)
      at javax.swing.table.DefaultTableColumnModel.getColumn(Unknown Source)
      at javax.swing.JTable.sizeColumnsToFit(Unknown Source)
      at psft.pt75.gui.PSTable.setColumnWidthsToFit(PSTable.java:401)
      at psft.pt75.gui.PSTable.resetRows(PSTable.java:588)

      The calling code is located in the attachments and it being used
      correctly even though the method has been deprecated.

      Name: tb29552 Date: 09/06/2000


      java version "1.3.0"
      Java<TM> 2 Runtime Environment, Standard Edition <build 1.3.0-C>
      Java Hotspot<TM> Client VM <build 1.3.0-C, mixed mode>

      This problem only occurs since updating to the 1.3 plug-in. Applet worked fine
      with 1.2.2_005

      1. Running this Applet in for our Peoplesoft Self Service System - Apply for
      Leave:
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">

      <HTML>
      <HEAD>
      <TITLE>Apply For Leave</TITLE>
      <META NAME="Generator" CONTENT="NetObjects Fusion 2.0.2 for Windows">

      </HEAD>

      <BODY BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#800080" TEXT="#000000">

        <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=746>
         <TR VALIGN="top" ALIGN="left">
              <TD HEIGHT =15></TD>
              <TD WIDTH=691 COLSPAN=5>
                <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 >
               <TR VALIGN="top" ALIGN="left">
                      <TD WIDTH=130><P><A HREF="../html/employee.html"><FONT SIZE="-2"
      FACE="MS Sans Serif">Employee Main Menu</FONT></A><FONT SIZE="-2" FACE="MS Sans
      Serif"></FONT></TD>

                      <TD WIDTH=153><P><A
      HREF="../html/personal_family_information.html"><FONT SIZE="-2" FACE="MS Sans
      Serif">Personal/Family Information</FONT></A><FONT SIZE="-2" FACE="MS Sans
      Serif"></FONT></TD>

                      <TD WIDTH=122><P><A
      HREF="../html/my_payroll_information.html"><FONT SIZE="-2" FACE="MS Sans
      Serif">My Payroll Information</FONT></A><FONT SIZE="-2" FACE="MS Sans
      Serif"></FONT></TD>

                      <TD WIDTH=67><P><A HREF="../html/my_benefits.html"><FONT
      SIZE="-2" FACE="MS Sans Serif">My Benefits</FONT></A><FONT SIZE="-2" FACE="MS
      Sans Serif"></FONT></TD>

                      <TD WIDTH=77><P><A HREF="../html/my_career.html"><FONT SIZE="-2"
      FACE="MS Sans Serif">My Career</FONT></A><FONT SIZE="-2" FACE="MS Sans
      Serif"></FONT></TD>

                      <TD WIDTH=87 HEIGHT=15><P><A HREF="../index.html"><FONT
      SIZE="-2" FACE="MS Sans Serif">Home</FONT></A><FONT SIZE="-2" FACE="MS Sans
      Serif"></FONT></TD>

               </TR>
                </TABLE></TD>
              <TD></TD>
         </TR>
         <TR VALIGN="top" ALIGN="left">
              <TD WIDTH=25 HEIGHT =5><IMG
      SRC="../assets/auto_generated_images/img_5c9a8d0.gif" WIDTH =25 HEIGHT =1
      BORDER=0></TD>
              <TD WIDTH=3><IMG SRC="../assets/auto_generated_images/img_5c9a8d0.gif"
      WIDTH =3 HEIGHT =1 BORDER=0></TD>
              <TD WIDTH=7><IMG SRC="../assets/auto_generated_images/img_5c9a8d0.gif"
      WIDTH =7 HEIGHT =1 BORDER=0></TD>
              <TD WIDTH=25><IMG SRC="../assets/auto_generated_images/img_5c9a8d0.gif"
      WIDTH =25 HEIGHT =1 BORDER=0></TD>
              <TD WIDTH=615><IMG SRC="../assets/auto_generated_images/img_5c9a8d0.gif"
      WIDTH =615 HEIGHT =1 BORDER=0></TD>
              <TD WIDTH=41><IMG SRC="../assets/auto_generated_images/img_5c9a8d0.gif"
      WIDTH =41 HEIGHT =1 BORDER=0></TD>
              <TD WIDTH=30><IMG SRC="../assets/auto_generated_images/img_5c9a8d0.gif"
      WIDTH =30 HEIGHT =1 BORDER=0></TD>
         </TR>
         <TR VALIGN="top" ALIGN="left">
              <TD COLSPAN=3></TD>
              <TD COLSPAN=2 ALIGN=CENTER><TABLE WIDTH=640>
       <TR>
          <TD VALIGN=MIDDLE ALIGN=LEFT><FONT SIZE="+2" FACE="MS Sans Serif">Apply For
      Leave</FONT></TD>
          <TD ALIGN=RIGHT><IMG HEIGHT=55 SRC="../assets/images/img_no_text.jpg"
      BORDER=0 ALT=" Apply For Leave " ></TD>
        </TR>
      </TABLE></TD>

              <TD COLSPAN=2></TD>
         </TR>
         <TR VALIGN="top" ALIGN="left">
              <TD COLSPAN=7 HEIGHT =1></TD>
         </TR>
         <TR VALIGN="top" ALIGN="left">
              <TD COLSPAN=3 HEIGHT =400></TD>
              <TD WIDTH=640 COLSPAN=2>

      <!--"CONVERTED_APPLET"-->
      <!-- CONVERTER VERSION 1.0 -->
      <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
      WIDTH = 640 HEIGHT = 400
      codebase="http://eit.epa.ericsson.se/pw/downloads.htm#java">
      <PARAM NAME = CODE VALUE = "psft.pt75.applet.PanelApplet.class" >
      <PARAM NAME = CODEBASE VALUE = "/javaclient/" >
      <PARAM NAME = ARCHIVE VALUE = "bea.jar,pstools.jar" >

      <PARAM NAME="type" VALUE="application/x-java-applet;version=1.2">
      <PARAM NAME = "CABBASE" VALUE ="beajolt1115i.cab,pstools758.cab">
      <PARAM NAME = "server_port" VALUE ="9000">
      <PARAM NAME = "focus_image" VALUE ="../assets/duplicate9/button.gif">
      <PARAM NAME = "button_image" VALUE ="../assets/duplicate8/button.gif">
      <PARAM NAME = "background_color" VALUE ="15527412">
      <PARAM NAME = "foreground_color" VALUE ="0">
      <PARAM NAME = "button_font_color" VALUE ="0">
      <PARAM NAME = "button_highlite_color" VALUE ="160">
      <PARAM NAME = "font_name" VALUE ="helvetica">
      <PARAM NAME = "font_style" VALUE ="Bold">
      <PARAM NAME = "font_size" VALUE ="10">
      <PARAM NAME = "security_menu" VALUE ="W3_EMPLOYEE">
      <PARAM NAME = "panel_group" VALUE ="EPA_W3_LEAVE_APPL">
      <PARAM NAME = "panel_market" VALUE ="GBL">
      <PARAM NAME = "panel_mode" VALUE ="U">
      <PARAM NAME = "confirm_save" VALUE ="Yes">
      <PARAM NAME = "toolbar_height" VALUE ="38">
      <PARAM NAME = "toolbar_label_pad" VALUE ="4">
      <PARAM NAME = "locale" VALUE ="en_GB">
      <PARAM NAME = "toolbar_button_exclude" VALUE
      =",Search,Next,Previous,Run,Insert,Delete">
      <PARAM NAME = "toolbar_button_names" VALUE =",Exit=Logout">
      <COMMENT>
      <EMBED type="application/x-java-applet;version=1.2" java_CODE =
      "psft.pt75.applet.PanelApplet.class" java_CODEBASE = "/javaclient/" java_ARCHIVE
      = "bea.jar,pstools.jar" WIDTH = 640 HEIGHT = 400 CABBASE =
      "beajolt1115i.cab,pstools758.cab" server_port = "9000" focus_image =
      "../assets/duplicate9/button.gif" button_image =
      "../assets/duplicate8/button.gif" background_color = "15527412" foreground_color
      = "0" button_font_color = "0" button_highlite_color = "160" font_name =
      "helvetica" font_style = "Bold" font_size = "10" security_menu = "W3_EMPLOYEE"
      panel_group = "EPA_W3_LEAVE_APPL" panel_market = "GBL" panel_mode = "U"
      confirm_save = "Yes" toolbar_height = "38" toolbar_label_pad = "4" locale =
      "en_GB" toolbar_button_exclude = ",Search,Next,Previous,Run,Insert,Delete"
      toolbar_button_names = ",Exit=Logout"
      pluginspage="http://eit.epa.ericsson.se/pw/downloads.htm#java"><NOEMBED></COMMEN
      T>

      </NOEMBED></EMBED>
      </OBJECT>

      <!--
      <APPLET CODE = "psft.pt75.applet.PanelApplet.class" CODEBASE = "/javaclient/"
      ARCHIVE = "bea.jar,pstools.jar" WIDTH = 640 HEIGHT = 400 >
      <PARAM NAME = "CABBASE" VALUE ="beajolt1115i.cab,pstools758.cab">
      <PARAM NAME = "server_port" VALUE ="9000">
      <PARAM NAME = "focus_image" VALUE ="../assets/duplicate9/button.gif">
      <PARAM NAME = "button_image" VALUE ="../assets/duplicate8/button.gif">
      <PARAM NAME = "background_color" VALUE ="15527412">
      <PARAM NAME = "foreground_color" VALUE ="0">
      <PARAM NAME = "button_font_color" VALUE ="0">
      <PARAM NAME = "button_highlite_color" VALUE ="160">
      <PARAM NAME = "font_name" VALUE ="helvetica">
      <PARAM NAME = "font_style" VALUE ="Bold">
      <PARAM NAME = "font_size" VALUE ="10">
      <PARAM NAME = "security_menu" VALUE ="W3_EMPLOYEE">
      <PARAM NAME = "panel_group" VALUE ="EPA_W3_LEAVE_APPL">
      <PARAM NAME = "panel_market" VALUE ="GBL">
      <PARAM NAME = "panel_mode" VALUE ="U">
      <PARAM NAME = "confirm_save" VALUE ="Yes">
      <PARAM NAME = "toolbar_height" VALUE ="38">
      <PARAM NAME = "toolbar_label_pad" VALUE ="4">
      <PARAM NAME = "locale" VALUE ="en_GB">
      <PARAM NAME = "toolbar_button_exclude" VALUE
      =",Search,Next,Previous,Run,Insert,Delete">
      <PARAM NAME = "toolbar_button_names" VALUE =",Exit=Logout">

      </APPLET>
      -->
      <!--"END_CONVERTED_APPLET"-->


      <!--<APPLET CODE="psft.pt75.applet.PanelApplet.class"
      CODEBASE="../psft.pt75.applet.PanelApplet/" HEIGHT=400 WIDTH=640
      ></APPLET>--></TD>
              <TD COLSPAN=2></TD>
         </TR>
         <TR VALIGN="top" ALIGN="left">
              <TD COLSPAN=7 HEIGHT =16></TD>
         </TR>
         <TR VALIGN="top" ALIGN="left">
              <TD COLSPAN=4 HEIGHT =13></TD>
              <TD WIDTH=656 COLSPAN=2 ALIGN="left" VALIGN="top"><IMG HEIGHT=7
      WIDTH=585 SRC="../assets/images/purple_line.gif" BORDER=0 ALT="Picture" ></TD>
              <TD></TD>
         </TR>
         <TR VALIGN="top" ALIGN="left">
              <TD COLSPAN=2 HEIGHT =15></TD>
              <TD WIDTH=688 COLSPAN=4>
                <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 >
               <TR VALIGN="top" ALIGN="left">
                      <TD WIDTH=127><P><A HREF="../html/employee.html"><FONT SIZE="-2"
      FACE="MS Sans Serif">Employee Main Menu</FONT></A><FONT SIZE="-2" FACE="MS Sans
      Serif"></FONT></TD>

                      <TD WIDTH=153><P><A
      HREF="../html/personal_family_information.html"><FONT SIZE="-2" FACE="MS Sans
      Serif">Personal/Family Information</FONT></A><FONT SIZE="-2" FACE="MS Sans
      Serif"></FONT></TD>

                      <TD WIDTH=122><P><A
      HREF="../html/my_payroll_information.html"><FONT SIZE="-2" FACE="MS Sans
      Serif">My Payroll Information</FONT></A><FONT SIZE="-2" FACE="MS Sans
      Serif"></FONT></TD>

                      <TD WIDTH=67><P><A HREF="../html/my_benefits.html"><FONT
      SIZE="-2" FACE="MS Sans Serif">My Benefits</FONT></A><FONT SIZE="-2" FACE="MS
      Sans Serif"></FONT></TD>

                      <TD WIDTH=77><P><A HREF="../html/my_career.html"><FONT SIZE="-2"
      FACE="MS Sans Serif">My Career</FONT></A><FONT SIZE="-2" FACE="MS Sans
      Serif"></FONT></TD>

                      <TD WIDTH=87 HEIGHT=15><P><A HREF="../index.html"><FONT
      SIZE="-2" FACE="MS Sans Serif">Home</FONT></A><FONT SIZE="-2" FACE="MS Sans
      Serif"></FONT></TD>

               </TR>
                </TABLE></TD>
              <TD></TD>
         </TR>
         <TR VALIGN="top" ALIGN="left">
              <TD COLSPAN=7 HEIGHT =5></TD>
         </TR>
        </TABLE>
      </BODY>
      </HTML>

      2. Error Message is:
      java.lang.ArrayIndexOutOfBoundsException: 3 >= 0

      3. Output from Java Console is:

      Java(TM) Plug-in: Version 1.3.0-C
      Using JRE version 1.3.0 Java HotSpot(TM) Client VM
        User home directory = C:\WINNT\Profiles\epajmk
      Proxy Configuration: Manual Configuration
           Proxy:
      http=www-proxy.epa.ericsson.se:8888;https=www-proxy.epa.ericsson.se:8888;ftp=www
      -proxy.epa.ericsson.se:8888;gopher=www-proxy.epa.ericsson.se:8888
           Proxy Overrides: *erisoft.se,*ericsson.se
      JAR cache enabled.
      java.lang.ArrayIndexOutOfBoundsException: 3 >= 0
      at java.util.Vector.elementAt(Unknown Source)
      at javax.swing.table.DefaultTableColumnModel.getColumn(Unknown Source)
      at javax.swing.JTable.sizeColumnsToFit(Unknown Source)
      at psft.pt75.gui.PSTable.setColumnWidthsToFit(PSTable.java:401)
      at psft.pt75.gui.PSTable.resetRows(PSTable.java:588)
      at psft.pt75.ppr.SearchDialog.searchButtonPressed(SearchDialog.java:561)
      at psft.pt75.ppr.SearchDialog.okButtonPressed(SearchDialog.java:649)
      at psft.pt75.ppr.SearchDialog.setVisible(SearchDialog.java:487)
      at
      psft.pt75.ppr.PanelGroupProcessor.getNewKeys(PanelGroupProcessor.java:368)
      at
      psft.pt75.ppr.PanelGroupProcessor.getNewKeys(PanelGroupProcessor.java:338)
      at psft.pt75.ppr.PanelGroupProcessor.start(PanelGroupProcessor.java:282)
      at psft.pt75.ppr.PanelGroupProcessor.start(PanelGroupProcessor.java:188)
      at psft.pt75.applet.PanelApplet.run(PanelApplet.java:303)
      at psft.pt75.applet.Applet$2.run(Applet.java:651)
      at java.awt.event.InvocationEvent.dispatch(Unknown Source)
      at java.awt.EventQueue.dispatchEvent(Unknown Source)
      at java.awt.EventDispatchThread.pumpOneEvent(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.run(Unknown Source)
      (Review ID: 109309)
      ======================================================================

            Assignee:
            Scott Violet (Inactive)
            Reporter:
            Albert Tong-schmidt (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: