1 package yukihane.inqubus.gui;
3 import java.awt.Dimension;
4 import javax.swing.JComboBox;
5 import javax.swing.JTextField;
8 * ComboBoxの幅に入りきらない場合はリストを拡張します.
9 * http://www.jroller.com/santhosh/entry/make_jcombobox_popup_wide_enough
12 class FileComboBox extends JComboBox<String> {
14 private static final long serialVersionUID = 1L;
15 private boolean layingOut = false;
22 JTextField getEditorComponent() {
23 return (JTextField) getEditor().getEditorComponent();
27 public void doLayout() {
37 public Dimension getSize() {
38 Dimension dim = super.getSize();
40 dim.width = Math.max(dim.width, getPreferredSize().width);