package CHAPTER10;

import javax.swing.JComboBox;
import javax.swing.JFrame;

public class C10_18_JComboBoxExample extends JFrame {
	public C10_18_JComboBoxExample() {

		JComboBox<String> comboBox = new JComboBox<>(new String[] { "Option 1", "Option 2" });

		// JComboBox를 JFrame에 추가
		add(comboBox);

		// JFrame 설정
		setTitle("JComboBox Example");
		setSize(300, 100);
		setDefaultCloseOperation(EXIT_ON_CLOSE);
		setVisible(true);
	}

	public static void main(String[] args) {
		new C10_18_JComboBoxExample();
	}
}