Default settings for Play Java applications

I started worked with a play example and encountered this error.

package controllers;


import models.Proposal;



import play.mvc.Controller;

import play.mvc.Result;

import play.mvc.Results;

import models.*;


public class MainController extends Controller {


    public static Result welcome(String name) {

        return ok("<h1> Welcome " + name + "</h1>").as("text/html");



    public static Result index() {

        return ok(views.html.index.render("Hi from Java"));



    public static Result newProposal(){

    Form<Proposal> proposalForm = Form.form(Proposal.class);


    return ok(views.html.newProposal.render(proposalForm));



    public static Result submitProposal(){

    return Results.TODO;





[error] /Users/radhakrishnan/Documents/hello-play/app/controllers/ error: incompatible types: cannot be converted to
[error] return ok(views.html.newProposal.render(proposalForm));

I struggled with this error until I set play.Project.playJavaSettings in my build.sbt