hi

you know I'm doing a project on java instant messenger. I was thinking how would i implement it. should i use a seperate class for each component of the messenger. for example one class for its gui, one class for its chat diaglog, one for it jtree panel(to show the users).....etc, or should I implement it all together.

but now im confused if I implement it as seperate classes, how would i compile all these, like in main, and how would i put it together e.g. if i implement jtree, which would be to show the users who are logged in and out, in other file how would i call it in main gui part etc...

btw its a client and server based application

any advice will be appreciated :)

thanks

First, it is good programming practice to keep the various components separated (separate class files for gui, chat etc..)

Second I would strongly recommend getting an IDE to develop with. I can easily recommend both Netbeans (www.netbeans.org) or Eclipse (www.eclipse.org) They will help you organize the many files that are likely to make up your project. They will also speed up your development with GUI editors, compiling and packaging. There is a learning curve, but there are excellent tutorials available to help.

I wrote a small chat client a while back and I implemented a Hashtable to contain User and socket (user was the key, socket the value) So, you could iterate through the hashtable keys to build the JTree of users.

To compile multiple .java files you would run the following command line: javac -d <directoryforoutput> *.java

That is the simplest method. See javac -help for more details on compiling.

In order to use the various classes in the main() you would need to create objects representing your classes:

void main(String[] args){
MyGUIClass gui = new MyGUIClass();
gui.setVisible(true);
}

This snippet presumes that your class MyGUIClass extends one of the Java window classes (like JFrame).

Again, I would urge you to look into getting one of the IDE's mentioned above. It will make development much easier, as most of the details will be handled by it, leaving you free to work on implementing the important bits that hold everything together.

First, it is good programming practice to keep the various components separated (separate class files for gui, chat etc..)

Second I would strongly recommend getting an IDE to develop with. I can easily recommend both Netbeans (www.netbeans.org) or Eclipse (www.eclipse.org) They will help you organize the many files that are likely to make up your project. They will also speed up your development with GUI editors, compiling and packaging. There is a learning curve, but there are excellent tutorials available to help.

I wrote a small chat client a while back and I implemented a Hashtable to contain User and socket (user was the key, socket the value) So, you could iterate through the hashtable keys to build the JTree of users.

To compile multiple .java files you would run the following command line: javac -d <directoryforoutput> *.java

That is the simplest method. See javac -help for more details on compiling.

In order to use the various classes in the main() you would need to create objects representing your classes:

void main(String[] args){
MyGUIClass gui = new MyGUIClass();
gui.setVisible(true);
}

This snippet presumes that your class MyGUIClass extends one of the Java window classes (like JFrame).

Again, I would urge you to look into getting one of the IDE's mentioned above. It will make development much easier, as most of the details will be handled by it, leaving you free to work on implementing the important bits that hold everything together.

thanks alot mate. I already have netbeans and sort of knw how to use it but thanks again.

For starters, start your own thread and don't hijack someone else's thread. And read a tutorial on Socket classes.

Sam, are you developing a Server part as well or just a client?

hi,

yes i did both sides of the application(server and client). It was completed almost 4 months ago :mrgreen:

I have a simple question....
How much does it generally cost for a programmer to create an Instant Message program? Oh, and also a program like photobucket.com
tati

That would depend on the programmer :)
Some may cost you $10 in coffee and pizza per day and need a decade, others may cost you $250 an hour in hard cash and need a day.

That would depend on the programmer :)
Some may cost you $10 in coffee and pizza per day and need a decade, others may cost you $250 an hour in hard cash and need a day.

Hello, thank you for the quick response. :-) So could you tell me the best way I can find the programmer that will charge the 250.00 and get it done sooner than a decade? I am interested in creating an instant messenger similar to yahoo instant messenger but most importantly have the instant messenger be able to pull images from a similar program as photobucket. Is that possible?

Photobucket would be fairly simple to create, you just need a good CMS and adequate server. An IM client could also be done in a relatively short time, depending on required features.

If you're serious about hiring a programmer, you could check out rentacoder.com

As you might know from the thread i have created a messenger similar to yahoo(without the photobucket thing and less functions then yahoo). I have tested it etc, if you want i can sell for a fair price. let me know..

As you might know from the thread i have created a messenger similar to yahoo(without the photobucket thing and less functions then yahoo). I have tested it etc, if you want i can sell for a fair price. let me know..

Hi.

I saw your thread about a messenger. May I know how much?

Can I use it to send messenge to Yahoo Messenger, If I know yahoo instant messenger usernames?

Thanks

Hi.

I saw your thread about a messenger. May I know how much?

Can I use it to send messenge to Yahoo Messenger, If I know yahoo instant messenger usernames?

Thanks

If you want to send him a private message I guess that's up to you, but I don't think transacting the sale of programs is the purpose of the forum.

I believe he said his program had similar functionality to Yahoo, not that it was compatible.

hi sam .. good post, i really got agreat idea how i'm going to start my project throw reading this ..
but i have somehow no idea about the server side , how can i start and with what ??

any advice will be appreciated :)

thanks ..

Hally ...
a first part of advice: read the dates on the previous posts. Nobody posted in this thread for almost 4 years, I'm pretty sure the original posters are not following this thread anymore.

start with your project, and if you have specific questions: come here, create a new thread, post relevant code and problems you have, show your error messages (stack trace) and give us something to work with .

could one of the admins please close this thread?

This article has been dead for over six months. Start a new discussion instead.