Simple Java GUI function grapher