[3948] in java-interest

home help back first fref pref prev next nref lref last post

[Q]Button - alpha3

daemon@ATHENA.MIT.EDU (Kouichi Taniguchi)
Tue Dec 5 06:47:44 1995

To: java-interest@java.sun.com
Date: Tue, 05 Dec 1995 19:25:33 +0900
From: Kouichi Taniguchi <taniguti@is.toyo-eng.co.jp>

Hi all,

This is Koichi Taniguchi from Japan.

I am now writting applets using Alpha 3, because My applets have to
indicates Japanese Character(2bytes code).

I wrote sample applet of Button class.
But it doen"t run. not loaded message returns. There is no problems
when compiling. 
Other applets that is placed as the same directory run fine.

Am I missing something in this applet?

Thanks for your help
Koichi
E-mail:taniguti@is.toyo-eng.co.jp

FILE: testButton.java
--------------------------------------------------------------------
import awt.*;
import browser.Applet;

class NewButton extends Button {
   public NewButton(String label, String name, Window w)
   {
      super(label,name,w);
   }
   public void selected(Component c, int pos) {
      System.out.println("Success");
   }
}

class testButton extends Applet {
   NewButton button = new NewButton("test button", "test", item.parent);
   protected void init() {
      resize(200,200);
   }
   public void paint(Graphics g) {
      button.map();
   }

}

------------------------------------------------------------------
HTML:
<H2>Button Test</H2>
<app class="testButton">
 
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post