954,523 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

building instant messenger

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

sam1
Posting Whiz
300 posts since Nov 2004
Reputation Points: 10
Solved Threads: 1
 

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 *.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.

sfbell
Newbie Poster
13 posts since Jan 2006
Reputation Points: 11
Solved Threads: 0
 

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 *.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.

sam1
Posting Whiz
300 posts since Nov 2004
Reputation Points: 10
Solved Threads: 1
 

i am new to programming and i want to build a messenger for my web site any advise

EshwarBaul
Newbie Poster
1 post since Sep 2006
Reputation Points: 10
Solved Threads: 0
 

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?

Phaelax
Practically a Posting Shark
858 posts since Mar 2004
Reputation Points: 92
Solved Threads: 51
 

it's been 9 months now since he posted that question.
He'll either be done or have given up by now...

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

hi,

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

sam1
Posting Whiz
300 posts since Nov 2004
Reputation Points: 10
Solved Threads: 1
 

wow, didn't even pay attention to the dates.

Phaelax
Practically a Posting Shark
858 posts since Mar 2004
Reputation Points: 92
Solved Threads: 51
 

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

tlark77
Newbie Poster
2 posts since Sep 2007
Reputation Points: 10
Solved Threads: 0
 

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.

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 
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?

tlark77
Newbie Poster
2 posts since Sep 2007
Reputation Points: 10
Solved Threads: 0
 

You may try to put your offer in other section of this webie IT Water Cooler in Job Offers

peter_budo
Code tags enforcer
Moderator
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
 

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

Phaelax
Practically a Posting Shark
858 posts since Mar 2004
Reputation Points: 92
Solved Threads: 51
 

Also Freelancer.com

alpha_foobar
Junior Poster
182 posts since May 2005
Reputation Points: 20
Solved Threads: 5
 

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..

sam1
Posting Whiz
300 posts since Nov 2004
Reputation Points: 10
Solved Threads: 1
 
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

hiwind
Newbie Poster
1 post since Oct 2007
Reputation Points: 10
Solved Threads: 0
 

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.

Ezzaral
Posting Genius
Moderator
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
 

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

Phaelax
Practically a Posting Shark
858 posts since Mar 2004
Reputation Points: 92
Solved Threads: 51
 

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 ..

hally89
Newbie Poster
1 post since Jul 2011
Reputation Points: 10
Solved Threads: 0
 

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?

stultuske
Posting Sensei
3,137 posts since Jan 2007
Reputation Points: 1,114
Solved Threads: 433
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You