A new day, a fresh mind...
    Found the problem in the html file  - having a comma between the
WIDTH and HEIGHT parameters cause this problem.    Amazingly removing
this comma is the fix.   Sorry for the bandwidth...
smb

zembee wrote:

> I having problems running the appletviewer [RH5.0, jdk1.1.5v7].   I
> created the simple Scribble example from O'Rielly and the
> corresponding
> html file [attached].
>
> bash$ echo $JAVA_HOME
> /usr/local/java/
> bash$ echo $CLASSPATH
> .:/usr/local/java/lib/classes.zip
> bash$ appletviewer Scribble.html
> java.util.MissingResourceException: Can't find resource
>         at java.util.ResourceBundle.getObject(ResourceBundle.java)
>         at java.util.ResourceBundle.getString(ResourceBundle.java)
>         at
> sun.applet.AppletMessageHandler.getMessage(AppletMessageHandler.java:54)
>
>         at
> sun.applet.AppletPanel.showAppletStatus(AppletPanel.java:570)
>
>         at sun.applet.AppletPanel.init(AppletPanel.java:147)
>         at sun.applet.AppletViewer.<init>(AppletViewer.java:199)
>         at
> sun.applet.StdAppletViewerFactory.createAppletViewer(AppletViewer.java:87)
>
>         at sun.applet.AppletViewer.parse(AppletViewer.java:938)
>         at sun.applet.AppletViewer.parse(AppletViewer.java:904)
>         at sun.applet.AppletViewer.main(AppletViewer.java:1081)
>
> I do have the appletviewer.properties file:
>
> bash$ ls /usr/local/java/lib
> appletviewer.properties         font.properties.ru
> awt.properties                  font.properties.tr
> classes.zip                     font.properties.zh_GB2312
> content-types.properties        font.properties.zh_TW_Big5
> font.properties                 font.properties.zh_TW_CNS11643
> font.properties.cs              i386@
> font.properties.el              i486@
> font.properties.hu              i586/
> font.properties.ja              i686@
> font.properties.ko              psfont.properties.ja
> font.properties.lt              rmic.properties
> font.properties.lv              security/
> font.properties.pl              serialver.properties
>
> so what am I missing?
>
> Thanks,
> smbinyon
>
>
> --
> Visit my home page at http://zembee.home.ml.org
> [EMAIL PROTECTED]
>
>    ----------------------------------------------------------------
> import java.applet.*;
> import java.awt.*;
> import java.awt.event.*;
>
> /** A simple applet taht uses the Java 1.1 event handeling model */
>
> public class Scribble2 extends Applet
>         implements MouseListener, MouseMotionListener
> {
>         private int last_x, last_y;
>
>         public void init()
>         {
>                 // Tell this applet what MouseListener and
> MouseMotionListener
>                 // objects to notify when mouse and mouse motion
> events occur.
>                 // Since we implement the interfaces ourself, our own
> methods are called.
>
>                 this.addMouseListener(this);
>                 this.addMouseMotionListener(this);
>         }
>
>         // A method from the MouseListener interface. Invoked when the
>         // user presses the mouse button.
>
>         public void mousePressed(MouseEvent e)
>         {
>                 last_x = e.getX();
>                 last_y = e.getY();
>         }
>
>         // A method from the MouseMotionListener interface. Invoked
> when the
>         // user drags the mouse with a button pressed.
>
>         public void mouseDragged(MouseEvent  e)
>         {
>                 Graphics g = this.getGraphics();
>                 int x = e.getX(), y = e.getY();
>                 g.drawLine(last_x, last_y, x, y);
>                 last_x = x; last_y = y;
>         }
>
>         // The other, unused methods of the MouseListener interface
>
>         public void mouseReleased(MouseEvent e) {;}
>         public void mouseClicked(MouseEvent e) {;}
>         public void mouseEntered(MouseEvent e) {;}
>         public void mouseExited(MouseEvent e) {;}
>
>         // The other method of the MouseMotionListener interface.
>
>         public void mouseMoved(MouseEvent e) {;}
> }
>
>    ----------------------------------------------------------------
>



--
Visit my home page at http://zembee.home.ml.org
[EMAIL PROTECTED]



Reply via email to