File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Error in Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Error in "Headfirst Java"" Watch "Error in "Headfirst Java"" New topic

Error in "Headfirst Java"

George Sarbu

Joined: Mar 08, 2009
Posts: 6

Hello! When I try to compile a code from the great book "Head First Java",chapter 12(about GUI), i got an error.
The code is:

import javax.swing.*;
import java.awt.event.*;

public class SimpleGui1B implements ActionListener {

public static void main(String[] args) {

SimpleGui1B gui=new SimpleGui1B();

public void go() {

JFrame frame=new JFrame();

JButton buton=new JButton("click");




frame.setSize(400, 300);


public void actionPerformed(ActionEvent event) {
buton.setText("I've been clicked");


cannot find symbol
symbol:variable buton
location: class SimpleGui1B
buton,setText("I've been clicked")
1 error

Please help me !!!
xiss burg

Joined: Mar 04, 2009
Posts: 3

jQuery in Action, 2nd edition
subject: Error in "Headfirst Java"