Исправлен параметр в forms::newLabel

This commit is contained in:
Victor 2016-09-22 12:29:28 +03:00
parent 409893200f
commit 0439b719b4

View File

@ -40,7 +40,7 @@ public final class Components {
public static Value newLabel(Value... args) {
Arguments.checkRange(0, 2, args.length);
String text = (args.length >= 1) ? args[0].asString() : "";
int align = (args.length == 2) ? args[0].asInt() : SwingConstants.LEADING;
int align = (args.length == 2) ? args[1].asInt() : SwingConstants.LEADING;
return new JLabelValue(new JLabel(text, align));
}