How do I define it to return the List <Donors> object?
Type: Posts; User: Rick Sebastian
How do I define it to return the List <Donors> object?
No one helped me build the code. I'm using NetBeans IDe and their CRUD tutorial to build the project.
I just noticed another error message in the output window that says: "Internal Exception:...
Sorry.... I'm not understanding. The getResultList() method is defined to return string data in a query.
What does the code need to say in order to pull the data from the database?
The data is just text data from a database file. VARCHAR is the type.
Is that what you are asking?
The list should just display the names of the donors, their donation amount, and the charity name. Those are the only 3 fields in the database under the "donors" table.
It is in this section here: Specifically, the line in red.
public final class DonorViewerTopComponent extends TopComponent {
public DonorViewerTopComponent() {
initComponents();...
I am receiving the following error message when I compile my code and I have no idea how to fix it. Please help.
Scanning for modules in C:\Program Files (x86)\NetBeans 7.2.1\platform
Scanning...
Ah ha!! Got it.... print vs println
Duh.... Thanks so much!!
The only place that "\n" would logically fit into the code I have would be in the line:
outputFile.print(charity + "\n ");
That field is the last of the three fields I am trying to capture in...
I wrote the following code which (among other things) is supposed to produce a text file to hold data. The file is called "DonorInfo.txt".
The program creates the file and stores the information...
In order to do that, I would have to modify the text file itself, no? If not, where would I put that in the code?
I have to get a list of entries from a text file to display in a JFrame. I was able to do that but everything is displaying on one line.
How do I get it to display as it is listed in the text...
If this is the constructor:
myRadioButton1 = new JRadioButton("Meats", true); //Defines the meat radio button and sets it to default
myRadioButton2 = new...
Okay... I renamed all of the button statements to remove the variable:
myRadioButton1 = new JRadioButton("Meats", true); //Defines the meat radio button and sets it to default
...
I removed the line - private JRadioButton meats, dairy, bakery, produce, pharmacy; from the original code as you indicated I should and I left the variables in the button statements as follows:
...
The ButtonGroup the JRadiobutton is in is called "group". But if I plug the word "group" into the output string it doesn't recognize it.
Do I have to declare "group" as a variable maybe first??
...
I tried adding the word "group" to the statement too and it didn't recognize it in the expression.
I simply do not understand the syntax of the expression I need.
Would it be + group.add(meats)...
I used the JRadioButtonMenuItem name in the output string *assuming* it would identify the selected JRadioButtonMenuItem... That didn't work.
So unless I'm just not formatting the expression...
One more question if I may...
When the calculate button is clicked, the output window needs to reflect 4 items:
1. The item name
2. The department it came from (the radio button selection)
3....
Norm, curmudgeon - Guys, thanks so much. The error was obvious once you pointed it out.
Appreciate the help!!
I am writing a program that prompts a user to enter the name of an item, the price of the item, and the percentage discount on that item. The program then calculates the sale price and spits that out...
That worked. Much thanks!
I added this to the top of the code to add a sales persons name and their annual sales figure. The program will allow you to add the name of the first sales person, their sales, but then it skips...
Can you please explain how to change the compensation inside the loop as it increments by $5K each time?
That's a very good point about calculating the commission on the incremented sales totals. Unfortunately, I have absolutely no idea how to do that in the loop.
As for the math...
I thought the...