Solved

objects, continuing question

Posted on 2004-04-26
4
151 Views
Last Modified: 2010-03-31
If Mylistener is used in each class that makes up ever button panel for the custom section of the program, will all the actioncommands, be able to go to a single arraylist at that point using the AudioDetails class.

public class AudioDetails
{
   private String AudioFile;
   private String Timing;
   // could add other fields as needed

   public AudioDetails(String file, String timing)
   {
      AudioFile = file;
      Timing = timing;
   }

   public String getAudioFile()
   {
      return AudioFile;
   }

   public String getTiming()
   {
      return Timing;
   }
}
0
Comment
Question by:Drop_of_Rain
  • 2
4 Comments
 
LVL 30

Expert Comment

by:mayankeagle
ID: 10925386
Can't understand your question completely (you didn't give a link to the previous question), but I guess that if every button has a listener, why won't the action command go when there's an event?

BTW, what kind of listener is MyListener, and does it listen to some events on the Panel?
0
 
LVL 92

Accepted Solution

by:
objects earned 300 total points
ID: 10925401
yes, the MyListener class creates a list of AudioDetails objects.
0
 

Author Comment

by:Drop_of_Rain
ID: 10925480
If this is true, would this be the time for me to ask the question about the if statement doing the comparisons in that other if question "Help with a If statement" that is still open.
0
 
LVL 92

Expert Comment

by:objects
ID: 10925491
No from my understanding you'll need to deal with that once you decide to process that list.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now