First off, i know there is a java coding website with all sorts of nerds and things, but this is my home of all my questions. I don't like to stray very much.. so here I go.
I'm fairly good (in terms of an amature) at java programming. I look threw all the libraries to see what i can use and spit out a few programs every now and then. Lately I've been working on a program for my church for the sound box that has both ASL and Hearing. so far this this program is mostly complete.
I have 2 packages, and 1 class that made to run everything.
the 2 packages are very similar to each other and actually extend Frame (i know i should use java.swing but again, the whole straying thing) both packages also implement WindowListener, ActionListener, MouseListener.
now for the question. because I didn't make those packages abstract I have to implement all the different processes that WindowListener and MouseListener have to offer even though i'm only using 1 process for each. How do i declare my packages abstract and still be able to instantiate them?
that code is essentially all i have my main program do. If i make SHFrame and/or AHFrame abstract, the main program won't compile..it says: class is abstract cannot be instantiated. anyideas?? As of now the program works all i have to do is finish downloading the almost 30 dvd's and split them and then make the program properly look them up. If you want the rest of the code you can get it emailed to you. I'm not going to post it all. thank you.
I'm fairly good (in terms of an amature) at java programming. I look threw all the libraries to see what i can use and spit out a few programs every now and then. Lately I've been working on a program for my church for the sound box that has both ASL and Hearing. so far this this program is mostly complete.
I have 2 packages, and 1 class that made to run everything.
the 2 packages are very similar to each other and actually extend Frame (i know i should use java.swing but again, the whole straying thing) both packages also implement WindowListener, ActionListener, MouseListener.
now for the question. because I didn't make those packages abstract I have to implement all the different processes that WindowListener and MouseListener have to offer even though i'm only using 1 process for each. How do i declare my packages abstract and still be able to instantiate them?
Code:
if (ActOnWhat.equals("Hearing"))
{
SHFrame songFrame = new SHFrame("Choose Your Song");
soundFrame.dispose();
}
else if (ActOnWhat.equals("ASL"))
{
AHFrame aslFrame = new AHFrame("ASL");
soundFrame.dispose();
}


Comment