Using the default layout manager, JLabel displays its ellipsis when the frame size changes.
As it shown on the picture:
public static void main(String[] args) {
final JFrame jFrame = new JFrame("JLabel, show me your ellipsis!");
jFrame.getContentPane().add(new JLabel("Sure darling! Shrink me and I'll show you"));
jFrame.pack();
jFrame.setVisible(true);
}
However, MigLayout does not display this behavior!
public static void main(String[] args) {
final JFrame jFrame = new JFrame("JLabel, show me your ellipsis!");
jFrame.getContentPane().setLayout(new MigLayout());
jFrame.getContentPane().add(new JLabel("Nope! I just do not know you well enough!"));
jFrame.pack();
jFrame.setVisible(true);
}
I tried all the layout / component restrictions that I could think of. Does anyone know if this is possible in Mig?
source
share