problem with doja? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

problem with doja?

gijsmangijsman Posts: 1Member
[b][red]This message was edited by gijsman at 2005-10-25 1:29:31[/red][/b][hr]
[b][red]This message was edited by gijsman at 2005-10-25 1:28:43[/red][/b][hr]
I've got a project for school, I have to make a Doja appli.
its a kind of tamagochi idea.

but its the first time for me I used Doja,

I want to make 5 buttons that will change a GIF animation,
it succeeded making one button, but not more, beceause de the actionlistener gets the same name.. Can anyone help me and explain me in simple words?

this is the source-code I have:

* Written by Raber Sabir- November 2003-Hogeschool van Amsterdam
* Any comments? mail me at [email protected]

import com.nttdocomo.ui.*;
import com.nttdocomo.util.*;

public class Voorbeeld1 extends IApplication {
/* Maak een object van de class InlogScherm */
private InlogScherm inlogScherm;

public Voorbeeld1()
inlogScherm=new InlogScherm("Inlog Scherm");

public void start()

class InlogScherm extends Panel implements ComponentListener

private MediaImage image1, image2;
private VisualPresenter plaatje;
private ImageLabel imageLabel, imageLabel2;
private Button eetKnopje, balKnopje, zelfmoordKnopje, doushenKnopje, slaapKnopje, terugKnopje;

public InlogScherm(String title)

image2 = MediaManager.getImage("resource:///knijn/gifs/kanormaal.gif");

image1 = MediaManager.getImage("resource:///knijn/gifs/kaeten.gif");

plaatje = new VisualPresenter();

catch (Exception e)
System.out.println("Exception:" + e.getMessage());

eetKnopje=new Button("drink");
doushenKnopje=new Button("wassen");
zelfmoordKnopje=new Button("zelfmoord");
slaapKnopje=new Button("slapen");
balKnopje=new Button("bal");
terugKnopje=new Button("<<");



public void componentAction(Component source,
int type, int param)



Sign In or Register to comment.