Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-18-2008, 05:50 PM
Member
 
Join Date: Jun 2008
Posts: 1
asambasamba is on a distinguished road
total beginner needs little help
hey im a total beginner at java and what I am now trying to accomplish is a textarea and a button, and when you press the button the content of the textarea appears on the screen (so not in another textarea)

what I have now is:
import java.awt.*;
import java.applet.*;
import java.awt.event.*;

public class Conversie extends Applet
implements ActionListener {
TextField invoer;
Button conversieknop;

public void init() {
invoer = new TextField(20);


conversieknop = new Button("omzetten");
conversieknop.addActionListener(this);

add(invoer);
add(conversieknop);
}

public void actionPerformed(ActionEvent e, Graphics g) {
if(e.getSource() == conversieknop) {

String invoerstring;
int getal1;
int getal2;
invoerstring = invoer.getText();
getal1 = Integer.parseInt(invoerstring);
g.drawString("" + getal1, 0, 300);

}


}



}



The error i keep getting is:
The type Conversie must implement the inherited abstract method ActionListener.actionPerformed(ActionEvent)
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-18-2008, 07:33 PM
Senior Member
 
Join Date: Jul 2007
Posts: 1,222
hardwired is on a distinguished road
Code:
public class Conversie extends Applet implements ActionListener { // Java does not recognize this method signature as being part // of the ActionListener interface. public void actionPerformed(ActionEvent e, Graphics g) { ... // This method signature is defined in the ActionListener interface. public void actionPerformed(ActionEvent e) {
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Total Newbie, Be Kind :) dazza-s New To Java 11 04-27-2008 12:54 AM
Printing total out denisdoherty New To Java 1 04-25-2008 08:40 AM
beginner to Java notwist New To Java 15 04-18-2008 11:41 AM
Beginner-Moderate IDE Hiro ZA NetBeans 4 01-26-2008 08:16 AM
beginner needs help with OBD-II input andrewos New To Java 3 07-30-2007 11:46 AM


All times are GMT +3. The time now is 01:28 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org