Extrace the attached java applet into a new directory, say ~/javabug. Call the file "bug.java." Compile it as you'd compile any java applet, maybe javac bug.java Run the applet thus: appletviewer bug.java Click your various mouse buttons on the frame window and take not of its behaviour. Change directory and run it again: maybe cd .. appletviewer javabug/bug.java Note that this time there's a warning message in the top of the window warning the user that this is an applet window. You will also note that some of the text the applet attempts to display is obscured by this message. This behaviour is different from that I observe with Appletviewer on NT 4.0 Sp1 JDK 1.1.4 Netscape 4.something on NT Netscape 4.06 on Linux Appletviewer on OS/2 JDK 1.1.4 Netscape 2.02 with Java 1.1.4 on OS/2 and in pictures in my book Just Java, Sun Microsystems. In all these cases, the warning message is at the bottom of the window: in principle the user can, if something seems obscured, resize the window to see what's hidden. I have [summer@possum public_html]$ java -version java version "1.1.6" I don't seem to have the downloaded file to tell me more precisely. However, the timestamp on java is "Aug 29 19:07." Cheer John Summerfield http://os2.ami.com.au/os2/ for OS/2 support. Configuration, networking, combined IBM ftpsites index.
//<applet code=bug.class height=100 width=200> </applet> import java.applet.*; import java.awt.*; import java.awt.event.*; public class bug extends Applet { demoMouse F; public void init() { F = new demoMouse("TestFrame"); } } class demoMouse extends Frame implements MouseListener { String s,s2,s3; public void init() { s="test"; s2=""; s3=""; addMouseListener( this); setBounds(100,300,900,150); setBackground(Color.white); show(); } public demoMouse() {super();} public demoMouse(String p) { super(p); init(); } public void mouseExited(java.awt.event.MouseEvent e) {;} // public void mousePressed(java.awt.event.MouseEvent e) {;} public void mouseReleased(java.awt.event.MouseEvent e) {;} public void mouseEntered(java.awt.event.MouseEvent e) {;} public void mouseClicked(java.awt.event.MouseEvent e) {;} public void mousePressed(MouseEvent e) { s="test"; s2=""; if ((e.getModifiers() & InputEvent.BUTTON1_MASK) != 0) s= "button1 pressed" ; if ((e.getModifiers() & InputEvent.BUTTON2_MASK) != 0) s="button2 pressed" ; if ((e.getModifiers() & InputEvent.BUTTON3_MASK) != 0) s="button3 pressed" ; if ((e.getModifiers() & InputEvent.ALT_MASK) != 0) s2="alt pressed" ; if ((e.getModifiers() & InputEvent.META_MASK) != 0) s2="meta pressed"; if (e.isPopupTrigger()) s3="Pop the menu"; else s3 = e.toString(); repaint(); } // end method public void paint(Graphics g) { super.paint(g); g.drawString(s,5,40); g.drawString(s2,5,80); g.drawString(s3,5,120); } }