*/
package jalview.io.cache;
-import jalview.bin.Cache;
-import jalview.util.MessageManager;
-import jalview.util.Platform;
-
+import java.awt.Dimension;
+import java.awt.FontMetrics;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.FocusListener;
import javax.swing.event.DocumentListener;
import javax.swing.text.JTextComponent;
+import jalview.bin.Cache;
+import jalview.util.MessageManager;
+import jalview.util.Platform;
+
/**
* A class that provides an editable combobox with a memory of previous entries
* that may be persisted
{
appCache = null;
textComponent = textField = new JTextField();
+ FontMetrics fm = textField.getFontMetrics(textField.getFont());
+ textField.setPreferredSize(new Dimension(
+ fm.stringWidth(prototypeDisplayValue), fm.getHeight() + 4));
// {
// @Override
// public Dimension getPreferredSize() {