Problem with trying to click multiple buttons


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Problem with trying to click multiple buttons

  1. #1
    Join Date
    Sep 2005
    Posts
    1

    Problem with trying to click multiple buttons

    I'm currently programming my own audio player.
    I'm using audio input stream and line to read and write wav files.

    I'm also using Swing ask my program frames.
    For starting the line and stream i used a normal actionlistener on a Jbutton.

    But once i click on the button, i can't press any other buttons while the audio is streaming. I would like to click on my stop button to stop the audio from playing.
    Why can't i press any other buttons and how do i overcome it?

    I won't mind showing my source code if u PM me.

    Thank you for your help, much appreciated

  2. #2
    Join Date
    Jul 2005
    Location
    SW MO, USA
    Posts
    299
    Sounds like you are using the AWT engine's thread to do processing. What I mean is that the AWT engine's thread is what responds to user interfaces like button clicks and if you use that thread to do some processing, it can't respond to any user interaction until the processing terminates.
    Solution: If you have a long running process to do in response to a user's click, put it on its own thread so that the AWT engine's thread will be available to respond to user interactions.

Similar Threads

  1. Radio Button Problem.
    By Ravindra in forum ASP.NET
    Replies: 1
    Last Post: 05-13-2003, 12:56 AM
  2. Problem with Asp Buttons
    By usha in forum ASP.NET
    Replies: 0
    Last Post: 05-07-2003, 01:00 AM
  3. Replies: 2
    Last Post: 11-19-2002, 08:49 PM
  4. Reliability Problem
    By elise in forum .NET
    Replies: 0
    Last Post: 10-30-2002, 05:39 AM
  5. multiple buttons on a form
    By val in forum ASP.NET
    Replies: 4
    Last Post: 03-12-2002, 02:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center