:oops: Segue o codigo abaixo, nem imagino pq ta dando errado, mas não aparece os JTextField e Jelabels, Pq será, eu add no container!
Bom segue o codigo, para quem manja bem, vai ser facil de ajudar, Obrigado!
package l2;
import java.awt.*;
import javax.swing.*;
public class Exercicio1 {
public static void main(String[] args) {
JFrame j = new JFrame();
j.setVisible(true);
j.setSize(400, 150);
j.setTitle("Exercicio 1");
j.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Container cp = new Container();
JTextField text = new JTextField();
text.setVisible(true);
text.setSize(100,50);
text.setAlignmentX(50);
text.setAlignmentY(50);
cp.add(text);
JLabel label1 = new JLabel();
label1.setVisible(true);
label1.setText(" - Entre com o Primeiro Numero : ");
cp.add(label1);
JLabel label2 = new JLabel();
label2.setVisible(true);
label2.setText(" - Entre com o Segundo Numero : ");
cp.add(label2);
}
}