• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Need help understanding why my actionlistener is causing my program to freeze

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a few inner classes in my main class and within one of those inner classes I have two more inner classes (for my actionlistener classes). Within one of those actionlistener classes I am creating an instance of a higher level inner class. Is this causing my program to freeze?

The deleteButton actionlistener works great UNTIL I call the editButton actionlistener. Once I have called the editButton listener my program no longer responds to the original button actionlistener or the deleteButton actionlistener.

I am wondering if that instance of the higher inner class is causing this??? I am also curious as to whether or not a call to an actionlistener stays open after the code within the actionlistener has been implemented.

Please help :-(


 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
> Please help :-(

good luck, but most here won't read through 300+ lines of code (would you?).

you have to post something (small) that we can copy/paste/compile/run and see the problem on the screen.

doesn't matter how it looks, so get rid of the gridbaglayout stuff
any components not part of the problem - get rid of them
any listeners not part of the problem - get rid of them

all that is required is the bare minimum components/listeners to create the problem
 
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your current code doesn't compile for us and has a lot of extraneous code that is unrelated to your question. If you don't get a helpful answer soon, you'll likely increase your chances of help by creating a small compilable program that we can run and demonstrates your problem. People here will likely be grateful to you for limiting the code that they have to read through when trying to help you. Best of luck!

Edit: what Michael said above!
 
Sebastion Hill
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for the suggestion. I'll work on making a smaller more concise version and putting that up :-)
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic