The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
July 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

create GUI in applet

Posted by Nikey Wang on July 04, 2000 at 9:09 AM

import java.awt.*;
import java.applet.*;

public class Button extends Applet{
Button
b1=new Button("Button 1"),
b2=new Button("Button 2");
public void init(){
add(b1);
add(b2);
}
}

the above is a little program direct from the book Thinking in Java.But I can not interpret it.two error message prompt up saying" wrong number of arguments in constructor"
I also saw other books, this program is proved to be correct . But Why can't it be complied with JDK1.2.2?




Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us