Type: Posts; User: knowNothing23
Could someone help or give me an idea? It would even help, if you can recommend another programming software where Applets can actually work. I have tried Eclipse and NetBeans and both give me...
I don't know why you call those lines a problem, when the code is written exactly as your "correction".
Also, I added the class path of jnlp.jar and javaws.jar, but I don' know what you mean by...
I'm using NetBeans 7.2.1 with JDK 1.6 in a Windows XP system.
I have a problem with an Applet during runtime. The problem used to appear during compilation, but I found that adding the...
It's a very simple program:
import java.awt. Graphics;
public class WelcomeApplet extends JApplet
public void paint(Graphics g)
So, the notation is wrong. I need to create Comparator classes that will sort my ArrayList of Items by title ...
Use this to express your code. "[highlight = java] PASTE CODE HERE [/ highlight]"
Well, if you guys want to help me analyze it, while I do it on my own that would be even better.
I need to evaluate the rest of the code on my own. Maybe, I can get it to work. Thank you very much. I will keep you guys up to date with any progress.
Thank you aussiemcgr.
So, I have Item that implements the "Collections" Comparable interface and Textbook extends Item. I will not modify the compareTo() in Textbook yet
Thank you for trying to...
I erased my own Comparable class and now the code compiles a little further. It now crashes later and shows this:
----- DATABASE BEFORE SORTING: -----
DataBase.list has been called...
I get this when I implement Comparable<Textbook> in the Textbook class:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The interface Comparable cannot be implemented...
There's no reason, why Textbook implements it. I read somewhere that this should not matter and I had this same problem, before I implemented this to Textbook.
// sort and print sorted database (by id)
Collections.sort( library.getItem() );//uses Collections class
When removing (ArrayList), I get the error:
Exception in thread "main"...
The title says it all. I get the following error:
Exception in thread "main" java.lang.ClassCastException: assignment3.Textbook cannot be cast to java.lang.Comparable