Guessing game - Is it a 40? User has number in head, the program must guess the number. 

public class GuessingGame extends JFrame{

    JButton newGameButton, highButton, lowButton, correctButton, exitButton;
    JLabel initialTextLabel, enterLabel;
    JTextArea commentTextArea;
    JScrollPane scroll;
    private int guess, high = 101, low = 0, tries = 1;

    public guessingGame()
    {
        title("Guessing Game");
        newGameButton = new JButton("Start Game");
        exitButton = new JButton("Exit Game");
        highButton = new JButton("Too High");
        lowButton = new JButton("Too Low");
        correctButton = new JButton("Correct!");

        commentTextArea = new JTextArea(null,10,30);
        scroll = new JScrollPane(commentTextArea);
        commentTextArea.setEditable(false);
        initialTextLabel = new JLabel("Think of a number between 0 &amp; 100 can the computer guess it");
        enterLabel = new JLabel("Is your number: ");


        //add components


        highButton.setVisible(false);
        lowButton.setVisible(false);
        correctButton.setVisible(false);


        //set default jframe size

        //create and register the button event handlers


    }//end of GuessGame constructor

    //highButtonHandler class
    class highButtonHandler implements ActionListener
    {
        public void actionPerformed(ActionEvent e)
        {
                high = guess;
                guess = low + (guess - low) / 2;
                tries++;
                commentTextArea.append("Is the number " + guess + " too small, too high or correct.\n");
        }
    }//end of high class

    //lowButtonHandler class
    class lowButtonHandler implements ActionListener
        {
            public void actionPerformed(ActionEvent e)
            {
                low = guess;
                guess = guess + (high - guess) / 2;
                tries++;
                commentTextArea.append("Is the number " + guess + " too small, too high or correct.\n");
            }
        }//end of low class

    //correctButtonHandler class
    class correctButtonHandler implements ActionListener
        {
            public void actionPerformed(ActionEvent e)
            {
                commentTextArea.append("The computer took " + tries + " tries to guess your number");
            }
        }//end of correct class

    //newGame ButtonHandler class
    class newGameButtonHandler implements ActionListener
    {
        public void actionPerformed(ActionEvent e)
        {
            commentTextArea.setText(null); //clear textArea
            //reset values
            guess = 50;
            tries = 1;
            low = 0;
            high = 101;

            commentTextArea.append("Is the number " + guess +" too small, too high or correct.\n");
            newGameButton.setText("Start New Game"); //set button text
        }
    }//end of newGame class

    //exitButtonHandler class
    class exitButtonHandler implements ActionListener
    {
        public void actionPerformed(ActionEvent e)
        {
            System.exit(0);
        }
    }

    public static void main(String[] args)
    {
        guessingGame myGuessGame = new guessingGame(); //instantiate a GUI object
        myGuessGame.setVisible(true);
    }//end main
}
Pros


dedicated classes for the ActionListener
calls JFramw.setVisible() from outside any constructor


cons


Naming conventions: class names always start with upper case letter
Inheritance: never extend a class unless you want to change behavior, you only configure JFrame, so no need to extend it. 
comments: comments in code should explain why the code is like it is and only if it is somewhat unusual or unexpected. Your comments only repeat what the code expresses already.
System.exit(0);: This kills the JVM. There will be no change to i.e. close database connections correctly. Use it only in a catch block inside main.