Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4105347

java.awt.swing.SwingUtilities.convertPoint does not throw AWTError

XMLWordPrintable



      Name: akC57697 Date: 01/20/98



      The java.awt.swing.SwingUtilities.convertPoint does not throw AWTError in case when
      the source and the distination components do not have a common ancestor.

      The comments says:
           * If both <b>source</b> and <b>destination</b) are non null and does
           * not share a common ancestor, an error will be thrown.


      ---------------------8-<-------------------
      import java.awt.swing.SwingUtilities;
      import java.awt.*;

      public class SwingUtilitiesTest {
          public static void main(String s[]) {
          
             try {
              SwingUtilities.convertPoint(new Button(),
                                          new Point(10,10),
                                          new Canvas());
             } catch (AWTError e) {System.out.println("OKAY");}
               catch (Exception e) {System.out.println("Unexpected "+e);}
             System.out.println("No AWTError !");
            System.exit(0);
         }
      }
      --------------------->-8-------------------
      ------------------output-------------------
      (novo35 5): java SwingUtilitiesTest
      No AWTError !
      (novo35 6): java -fullversion
      java full version "JDK-1.2beta3-C"
      -------------------------------------------
      ======================================================================

            Unassigned Unassigned
            akuzminorcl Alexander Kuzmin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: