0

Hello,

I am making an IRC application and I was wondering how I could make a simple event that gets called like onMessage() every time a IRC message comes through so I can then do something like this in my main class:

public void onMessage(String message){
    System.out.println(message);
    //or Handle commands
}

I think it has something to do with interfaces but I can't find a tutorial on how I could do this. I am still learning about java. Thanks

2
Contributors
2
Replies
12
Views
4 Years
Discussion Span
Last Post by JamesCherrill
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.