You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
object Result extends Enumeration {
import JOptionPane._
val Yes : Result.Value = Value(YES_OPTION)
val Ok : Result.Value = Value(OK_OPTION)
val No : Result.Value = Value(NO_OPTION)
val Cancel: Result.Value = Value(CANCEL_OPTION)
val Closed: Result.Value = Value(CLOSED_OPTION)
}
where
public static final int YES_OPTION = 0;
public static final int OK_OPTION = 0;
public static final int NO_OPTION = 1;
public static final int CANCEL_OPTION = 2;
public static final int CLOSED_OPTION = -1;
As you can see both YES_OPTION and OK_OPTION is bound to 0.
This causes:
Exception in thread "AWT-EventQueue-1" java.lang.AssertionError: assertion failed: Duplicate id: 0
at scala.Enumeration$Val.<init>(Enumeration.scala:237)
at scala.Enumeration.Value(Enumeration.scala:177)
at scala.Enumeration.Value(Enumeration.scala:160)
at scala.swing.Dialog$Result$.<init>(RichWindow.scala:124)
at scala.swing.Dialog$Result$.<clinit>(RichWindow.scala)
is defined:
where
As you can see both
YES_OPTION
andOK_OPTION
is bound to0
.This causes:
when:
The text was updated successfully, but these errors were encountered: