0
code I used
import javax.swing.*;
public class ComboBox extends JFrame{
JComboBox<String> combo = new JComboBox<String>();
public ComboBox(){
add(combo);
combo.addItem("Brasil");
combo.addItem("Argentina");
setTitle("Título da Janela");
setSize(400,300);
setDefaultCloseOperation(EXIT_ON_CLOSE);
setLocationRelativeTo(null);
setVisible(true);
}
public static void main(String[] args){
new ComboBox();
}
}
sorry if the question was stupid, is that I was following java lessons on swing and the appearance of this component was different...it was more beautiful, have I fix it?
You have to set the Jframe layout
– kervincandido
can you give me an example? I’m very lay yet ;-;
– Cerf Pascal