Why can't I get my OnClickListener to work? Why would this code fragment in Eclipse give a "ClassHeader expected instead"?
<pre><code>package com.example.helloandroid;

import android.app.Activity;
import android.os.Bundle;
import android.widget.Button;
import android.view.View;
import android.view.View.OnClickListener;


//Create an anonymous implementation of OnClickListener
private OnClickListener buttonPress = new OnClickListener() {
    public void onClick(View v) {
      // do something when the button is clicked
        // setContentView(R.layout.panic);
    }
}



public class HelloAndroid extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Button myPanicButton = (Button)findViewById(R.id.PanicButton);
    setContentView(R.layout.main);
    myPanicButton.setOnClickListener(buttonPress);
    }
};
</code></pre>
