import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.FlowLayout;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
public class Main {
public static void main(String[] args) {
JComboBox comboBox = new JComboBox<>(new String[] { "A", "B", "C" });
comboBox.setEditable(true);
JTextField editorComponent = (JTextField) comboBox.getEditor()
.getEditorComponent();
editorComponent.addActionListener(e -> {
editorComponent.transferFocus();
});
JPanel panel = new JPanel(new FlowLayout());
panel.add(new JLabel("Field 1"));
panel.add(comboBox);
panel.add(new JLabel("Field 2"));
panel.a