lphystudio.core.swing.TidyComboBox Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lphy-studio Show documentation
Show all versions of lphy-studio Show documentation
The GUI for LPhy language.
The newest version!
package lphystudio.core.swing;
import javax.swing.*;
import java.awt.*;
public class TidyComboBox extends JComboBox {
public TidyComboBox(U[] data) {
super(data);
}
/**
* {@inheritDoc}
*/
@Override
public Dimension getMaximumSize() {
Dimension max = super.getMaximumSize();
max.height = getPreferredSize().height;
max.width = getPreferredSize().width + max.height;
return max;
}
}