Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/12/2014, 22:24
fnzoroaster
 
Fecha de Ingreso: diciembre-2014
Mensajes: 10
Antigüedad: 9 años, 4 meses
Puntos: 0
Error public class Main

Hola!, Tengo un problemita con un ejercico de una serie de tutoriales donde el codigo del programa es
Código:
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.*;

public abstract class VentanaChat extends JFrame implements ActionListener{

	private JTextArea area;
	private JScrollPane scroll;
	private JTextField texto;
	private JButton boton;
	
	public VentanaChat(){
		super("GridBagLayout");
		this.setSize(400, 400);
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		this.setLayout(new GridBagLayout());
		GridBagConstraints gbc = new GridBagConstraints();
	
		area = new JTextArea();
		scroll = new JScrollPane(area);
		texto = new JTextField(20);
		boton = new JButton("Enviar");
		
		gbc.gridx = 0;
		gbc.gridy = 0;
		gbc.gridwidth = 2;
		gbc.gridheight = 1;
		gbc.weightx = 1.0;	
		gbc.weighty = 1.0;
		gbc.fill = GridBagConstraints.BOTH;
		add(scroll,gbc);
		
		gbc.gridx = 0;
		gbc.gridy = 1;
		gbc.gridwidth = 1;
		gbc.gridheight = 1;
		gbc.weightx = 1.0;	
		gbc.weighty = 0.0;
		gbc.fill = GridBagConstraints.HORIZONTAL;
		add(texto,gbc);
		
		gbc.gridx = 1;
		gbc.gridy = 1;
		gbc.gridwidth = 1;
		gbc.gridheight = 1;
		gbc.weightx = 0.0;	
		gbc.weighty = 0.0;
		gbc.fill = GridBagConstraints.NONE;
		add(boton,gbc);
		
		boton.addActionListener(this);
		
		this.setVisible(true);
	}
	
	public void actionPerformered(ActionEvent e){
		if(e.getSource()==boton);{
			area.append(texto.getText()+"\n");
			texto.setText("");
		}
		
	}
}
y el Main

Código:
public class Main {

	public static void main(String args[]) {
		VentanaChat vc = new VentanaChat();
	}
}
y me sale un error en la clase Main que dice

"Multiple markers at this line
- Cannot instantiate the type VentanaChat
- Line breakpoint:Main [line: 5] -
main(String[])"

No puedo seguir con los tutoriales porque no entiendo que es lo que estoy haciendo mal aca, es algo muy simple y seguro me estoy perdiendo de lo mas importante
las dos class VentanaChat y Main estan en dos archivos diferentes.