Here is my current code. I am trying to get my array items to display in the GUI. The file compiles, but I get the following error message when the GUI tries to lauch.
Exception in thread "main" java.lang.NullP ointerException
at Labels.<init>(L abels.java:36)
at Inventory_Progr am4.<init>(Inve ntory_Program4. java:98)
at Inventory_Progr am4.main(Invent ory_Program4.ja va:121)...
User Profile
Collapse
-
I've been playing around with this for hours and I'm still stuck. Can you post an example of how to add a setItem method to the GUI?
Thanks again!Leave a comment:
-
-
GUI Headache
Hello,
I'm currently working on the dreaded Inventory Program. I'm on part four and just learning GUIs. I need to modify the Inventory Program to use a GUI. In the GUI, it should display the information in my array one line at a time as well as the value of my entire inventory, additional feature and restocking fee. I was able to create the GUI, but I can't populate it with my array items. Any tips on getting my array information... -
Oh my gosh - PERFECT!!!!!! Thank you so much!!!!!! IT WORKED!!!!!!!!! !!!!!!! Two days of hacking away and it worked!!!!!!Leave a comment:
-
Hello,
Thank you so much for the feedback, it's good to know that my subclass is ok. What I'm having problems with is creating object of class Book2 and calling the getBookAuthor() .
When I attempt to compile my main file, I get the following 7 errors:
C:\java>javac Inventory_Progr am3.java
Inventory_Progr am3.java:48: cannot find symbol
symbol : constructor Book(java.lang. String,int,int, double,java.lan g.String)...Leave a comment:
-
Attempting to Call a Method from a Subclass
Hello,
This is my first time to post on the forum, so I hope I'm doing this correctly. I am working on the dreading Java Inventory Program that seems to be legendary. I am currently on part 3 and have most of the program working. I created an additional feature (book author) in a subclass, which is supposed to be called in my main class and populate my array. I've created the subclass and added the new feature, but can't figure...
No activity results to display
Show More
Leave a comment: