NullPointerException on Dialog box - Android

view story

http://stackoverflow.com – I am trying to implement a dialog box to appear when a button is clicked. I followed an example to get this below code since I have never worked with dialogs before. I am getting a NPE in 2 separate spots in my Results class. I have commented in my code below both spots. Thank you in advanced for your help. Java code: public class Results extends Activity { Button detailsBtn; final Context context = this; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.resultsmain); detailsB (HowTos)