1 java frame 2 Tue Nov 06, 2012 8:26 pm
1101817
Vịt mới lớn
minh co chen hinh vao ma hem duoc cac ban chinh code dum minh he...cai frame no nho xiu ha chung bang long tay cai ha
import java.awt.*;
import javax.swing.JFrame;
import javax.swing.*;
/**
*
* @author Administrator
*/
public class test {
private JFrame frame;
private JComboBox com;
private JLabel label;
private final String[] thang={"1","2","3","4","5","6","7","8","9","10","11","12"};
public test(){
frame = new JFrame();
com = new JComboBox(thang);
label = new JLabel("Thang");
frame.add(label);
frame.setTitle("JCombox example");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(new Dimension(800,500));
frame.add(com);
frame.setVisible(true);
frame.pack();
frame.setLayout(new FlowLayout());
}
public static void main(String[] args){
test cb = new test();
}
}
import java.awt.*;
import javax.swing.JFrame;
import javax.swing.*;
/**
*
* @author Administrator
*/
public class test {
private JFrame frame;
private JComboBox com;
private JLabel label;
private final String[] thang={"1","2","3","4","5","6","7","8","9","10","11","12"};
public test(){
frame = new JFrame();
com = new JComboBox(thang);
label = new JLabel("Thang");
frame.add(label);
frame.setTitle("JCombox example");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(new Dimension(800,500));
frame.add(com);
frame.setVisible(true);
frame.pack();
frame.setLayout(new FlowLayout());
}
public static void main(String[] args){
test cb = new test();
}
}