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

Appletviewer hangs up in reloading an applet on Solaris2.5

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • None
    • 1.1.6
    • tools



      Name: diC59631 Date: 03/23/98


      JDK1.1.6K appletviewer hangs up in realoding an applet by its title menu
      clicking. Platform is as follows:
      SunOS ireland 5.5 Generic_103093-14 sun4m sparc SUNW,SPARCstation-5
       
      Following HTML and Java source code demonstrates the problem.
       
       
      <HTML>
      <Title>Applet</Title>
      <Body>
      <H2>Applet</H2>
      <applet code=SimpleApplet.class width=100 height=50>
      </applet>
      </BODY>
      </HTML
       
       
      import java.awt.*;
      import java.applet.*;
       
      public class SimpleApplet extends Applet implements java.awt.event.KeyListener,java.awt.event.MouseListener {
       
        Label label1;
        Label label2;
       
        public void init() {
          super.init();
       
          setSize(200,200);
          label1 = new Label("Type");
          label2 = new Label("Away!");
          label1.setBounds(0,0,200,100);
          label2.setBounds(0,100,200,100);
          add(label1);
          add(label2);
          this.label1.addKeyListener(this);
          this.label1.addMouseListener(this);
          this.label2.addKeyListener(this);
          this.label2.addMouseListener(this);
        }
       
        public void keyPressed(java.awt.event.KeyEvent event)
        {
          System.out.println(event.toString());
        }
        public void keyReleased(java.awt.event.KeyEvent event)
        {
          System.out.println(event.toString());
        }
        public void keyTyped(java.awt.event.KeyEvent event)
        {
          System.out.println(event.toString());
          Label label=(Label)event.getComponent();
          label.setText(String.valueOf(event.getKeyChar()));
        }
        
        public void mouseClicked(java.awt.event.MouseEvent event)
        {
        }
        public void mouseEntered(java.awt.event.MouseEvent event)
        {
        }
        public void mouseExited(java.awt.event.MouseEvent event)
        {
        }
        public void mousePressed(java.awt.event.MouseEvent event)
        {
          Component component=event.getComponent();
          component.requestFocus();
        }
        public void mouseReleased(java.awt.event.MouseEvent event)
        {
        }
       
      }
      (Review ID: 27000)
      ======================================================================

            mr Mark Reinhold
            dindrigo Daniel Indrigo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: