andre3080
11-18-2007, 06:43 AM
Hi...
im really new to java and that stuff... my probelm is that i have to ceate a little chat application and ive no idea how to do this.
So i started to construct a window using bluej:
import javax.swing.*;
public class FirstGUI extends JFrame
{
public FirstGUI()
{
super("Chatfenster");
setSize(600,300);
setLocation(300,300);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setVisible(true);
}
public static void main(String[] args)
{
FirstGUI g = new FirstGUI();
}
}
The program i have to write should look like a chat window, with to text fields. One in the bottom where you can write something and when you push on a "send" button it should appear in the other text field.
I would be really happy if someone could explain how to do this... thanks
im really new to java and that stuff... my probelm is that i have to ceate a little chat application and ive no idea how to do this.
So i started to construct a window using bluej:
import javax.swing.*;
public class FirstGUI extends JFrame
{
public FirstGUI()
{
super("Chatfenster");
setSize(600,300);
setLocation(300,300);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setVisible(true);
}
public static void main(String[] args)
{
FirstGUI g = new FirstGUI();
}
}
The program i have to write should look like a chat window, with to text fields. One in the bottom where you can write something and when you push on a "send" button it should appear in the other text field.
I would be really happy if someone could explain how to do this... thanks