Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

buttons don't work

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's the code:

[ January 26, 2002: Message edited by: Jim Yingst ]
 
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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();
setVisible(true);
try
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 ]
 
No more fooling around. Read this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic