developying a network game

Hi
I worked with netbeans and I want to write such a code but I don’t know any thing about how can we make a game as an online game? ( should I have a java application or not? …) please help me from the first by sending me some links that learn this from the first.thanks