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

javac hangs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • 1.1.1
    • tools
    • None
    • x86
    • windows_nt



      Name: sgC58550 Date: 06/20/97


      javac hangs

      Compiling the following java code causes javac to hang -- the compliation
      never completes.


      import java.awt.*;
      import java.awt.event.*;

      //
      //
      // TContentPanner
      //
      //
      public class TContentPanner
      {
      private ScrollPane panner;
      private Point pannerLast;
      private Point mouseLast;

      public TContentPanner( ScrollPane s )
      {
      panner = s;
      panner.addMouseListener(
      new MouseAdapter()
      {
      public void mousePressed( MouseEvent e )
      {
      if ( ( e.getModifiers() & InputEvent.BUTTON1_MASK ) != 0 &&
      inView( e ) )
      {
      panner.getComponent( 0 ).setCursor(
      Cursor.getPredefinedCursor( Cursor.MOVE_CURSOR )
      );
      mouseLast = e.getPoint();
      pannerLast = panner.getScrollPosition();
      }
      }

      public void mouseReleased( MouseEvent e )
      {
      if ( ( e.getModifiers() & InputEvent.BUTTON1_MASK ) != 0 )
      {
      panner.getComponent( 0 ).setCursor(
      Cursor.getPredefinedCursor( Cursor.HAND_CURSOR )
      );
      mouseLast = pannerLast = null;
      System.out.println( "Last = " + e );
      }
      }
      }
      ); // end addMouseListener

      panner.addMouseMotionListener(
      new MouseMotionAdapter()
      {
      public void mouseDragged( MouseEvent e )
      {
      if ( mouseLast != null )
      {
      Point current = e.getPoint();
      int dx = current.x - mouseLast.x;
      int dy = current.y - mouseLast.y;
      System.out.println( "Delta = ( " + dx + ", " + dy + " )" );
      mouseLast = current;
      pannerLast.translate( dx, dy );
      System.out.println( "New Pos = " + pannerLast );
      panner.setScrollPosition( pannerLast );
      }
      }
      }
      ); // end addMouseMotionListener
      }

      private boolean inView( MouseEvent e )
      {
      Insets pInsets = panner.getInsets();
      Point pViewOrigin = new Point( pInsets.left, pInsets.top );
      Rectangle pPort = new Rectangle( pViewOrigin, panner.getViewportSize() );

      if ( pPort.contains( e.getPoint() ) )
      return true;
      else
      return false;
      }
      }



      company - M. I. T. -- CECI , email - ###@###.###
      ======================================================================

            wmaddoxsunw William Maddox (Inactive)
            sgoodsunw Sheri Good (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: