(I want the exception to actually run but it won't, the exception class is no worry it's fine, the exception is if gameA is over 2 or gameB is over 0 it should say what's written in the exception, its just it won't run when I reach the point in which the exception would activate. The only way it would activate is if I take off the brackets in the if statement but then the text overlaps with the beginning text of the program I'm making. I've also tried putting the try statement outside of the if but that's useless too....)
if (A == 2 && B == 0){
g.setColor(Color.magenta);
g.drawString("(random text", 1, 1);
g.drawString("random text", 1, 1);
g.drawString("It bit you and now your one,", 1, 1);
try {
new GameOver(A,B);
}
catch (RandomException e){
g.drawString("No more, this program stops!", 1, 1);
}
}