This week's book giveaways are in the Angular and TypeScript and Web Services forums.
We're giving away four copies each of Programming with Types and The Design of Web APIs and have the authors on-line!
See this thread and this one for details.
Win a copy of Programming with Types this week in the Angular and TypeScript forum
or The Design of Web APIs in the Web Services forum!

gary werber

+ Follow
since Jul 22, 2019
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by gary werber

that solved the issue, hopefully the program runs as I expected.

Thanks guys.
1 week ago
So I would declare it at the top of my class?
1 week ago
Okay, is there anyway to access the accountinfo from the accountsearcher method?

The text document is a list of bank account names. Bank account names are created via the account name generator, which takes the person's username and password and merges it into an account name.

Ex: username: bob     password: 1234      accountname =  bob1234

So therefore:
If you want to see if an account exists, you type the username and password, the accountname generator turns it into an account name which is our search query. The program then searches the arraylist for the account name (search query)

This section of the program loads the list of account names into an array list. Via methods this arraylist is searched and modified. I want these actions to be performed via a method that can be called
from other parts of the program.

1 week ago

I'm not sure that I'm doing this in the most efficient way, but what I'm trying to do is have a method that searches an arraylist which can be called from another class.

I'm getting the error: "symbol accountinfo not found" Line: 39

Note: All imports have been excluded to save space.

Here is the minimal reproducible example:

1 week ago

I recently finished a genealogy program project that helped me reinforce my understanding of classes, objects and methods. However when I look at this program, it looks like something I could have done much more easily with a functional programming paradigm approach.
In other words, the classes I had where simply there because I was doing it the Java way, when I could have done the exact same thing in Matlab without classes. My next couple of projects are going to cover arrays, array lists, and some other Java fundamentals. However, after
I complete these, I'm looking for a project that really requires a solid understanding of OOP to execute correctly. I saw someone suggest creating a minesweeper clone, but will that mean I have to go in depth into Java GUI's before I attempt this project? I'm looking for any suggestions
for OOP heavy projects or if you think minesweeper fits the bill.

5 months ago
I'm not sure if I should start a new thread in a different section of the forum. But I'm curious about how I would go about importing the variable into another package. I've managed to do it before when that was all the program
was intended to do, but I feel as though I will run into road blocks doing it with this special case, due to all of the listeners and classes.

This is the code I'm trying to import it into.

Ideally I could use the variable as well as other listener variables to run in an algorithm.

5 months ago

So here is my updated attempt.

When I run this I get an error:

Exception in thread "main" java.lang.NullPointerException
at inputform.Traitform.<init>(
at inputform.Traitform.main(
C:\Users\user\AppData\Local\NetBeans\Cache\8.2\executor-snippets\run.xml:53: Java returned: 1
BUILD FAILED (total time: 1 second)
5 months ago
So here is the new version of my code with radio buttons, and the input form still works fine.

So rob camick, where would I put the constructor you are suggesting I use?
Would it go inside the public traitform (){} brackets?
5 months ago
So essentially my program is supposed take in user input for mother's hair color and eye color and the father's eye color and hair color.

This is the input form section of my code:


This code loads a frame with four rows of check boxes with four check boxes in each row. What I need to do from here is add an actionlistener that records the user input and assigns a value to a variable that I can use in other parts of my program.
I've been reading and watching videos about actionlisteners all day but I can't figure out how to implement one without and error.
5 months ago