JComboBox does not behave same as JTextField. How can i have it look similar?
问题 I have this following combo box, where i am able to create my combo box with items etc, but the look is not same as JTextField. How can i make JCombobox look same like JTextField? MyComboBox.java: import java.awt.Color; import javax.swing.*; import javax.swing.border.Border; import javax.swing.border.LineBorder; import javax.swing.plaf.basic.BasicComboBoxUI; public class MyComboBox extends JComboBox { public MyComboBox(String[] name) { Border border = BorderFactory.createEmptyBorder(11, 11,