File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes buttons don't work Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "buttons don Watch "buttons don New topic

buttons don't work

Sartaj Syed

Joined: Nov 11, 2001
Posts: 22
Buttons defined in the constructor of a frame which is the main screen of the program don't work. There are two other frames that are registered as ActionListerners with these buttons and are defined as two separate static inner classes within the public class of the file . The source code compiles and runs with the main screen being displayed. However when the buttons are clicked they do nothing. Please any suggestions.
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
Post some code so we can see what it is that you're talking about and maybe help to track down any errors.

Sartaj Syed

Joined: Nov 11, 2001
Posts: 22
Here's the code:

[ January 26, 2002: Message edited by: Jim Yingst ]
Graeme Brown
Ranch Hand

Joined: Oct 13, 2000
Posts: 193
Without looking at your code in too much detail, it looks like you have your references to your frames mixed up.
Try changing your actionPerformed methods. Instead of:
new Feedback();
new Feedback().setVisible(true);

or put the call to setVisible into the constructors for the inner classes.
[ January 26, 2002: Message edited by: Graeme Brown ]
I agree. Here's the link:
subject: buttons don't work
jQuery in Action, 3rd edition