eu tenho o seguinte código:
import java.awt.;
import javax.swing.;
public class MosaicExample extends JFrame {
private JPanel botoes;
private JPanel barraStatus;
private JScrollPane painelTexto;
private JButton novo, limpar, salvar, sair;
private JLabel mensagem, relogio;
private JTextArea areaTexto;
public MosaicExample() {
super("Mosaic Example");
novo = new JButton("Novo");
limpar = new JButton("Limpar");
mensagem = new JLabel("Mensagem: ");
relogio = new JLabel("Data/Hora: "+ new java.util.Date().toString());
barraStatus = new JPanel(new FlowLayout());
areaTexto = new JTextArea("Digite seu texto aqui: ", 20, 40);
painelTexto = new JScrollPane (areaTexto, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
}
public void ini() {
setForeground(Color.black);
setBackground(new Color(192, 192, 192));
setLocation(200,130);
setSize(640,480);
getContentPane().setLayout(new BorderLayout());
//Definição da área de botões
botoes.add(novo);
botoes.add(limpar);
barraStatus.add(mensagem);
barraStatus.add(relogio);
getContentPane().add(botoes, BorderLayout.NORTH);
getContentPane().add(painelTexto, BorderLayout.CENTER);
getContentPane().add(barraStatus, BorderLayout.SOUTH);
setVisible(true);
}
public static void main(String args[]){
new MosaicExample().init();
}
}
mas ele acusa o seguinte erro:
