Update Main.java

add max and min angle control