Fritz Guerilus

Ranch Hand
+ Follow
since Jun 20, 2009
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 Fritz Guerilus

Thanks I'll take a look at the Bunkhouse.
I've used the Official tutorials on Swing, but it can get difficult to understand sometimes becase I'm a beginner.
7 years ago
Can anyone recommend a good java book on swing?

I'm not looking for a reference book. I'm still a beginner and the reference books dont have enough explainations and tutorials.

I'm interested in a book with good explainations and tutorials that is good for beginners.

Thanks in advance.
7 years ago
Thanks Ralph, changing the panel to the CENTER made it work.

Rob, Darryl thanks for the further explaination and tips.

8 years ago
I'm having problems with getting the desired results when executing this program.

The code is from HeadFirst Java chapter 12, the first chapter on swing.

When I click on the button, it's supposed to change the colors on the oval randomly, but nothing happens.

Can anyone help and explain why nothing happens, and what I must do get it to work the way I want.

I wrote it in eclipse. Any help would be greatly appreciated.

I'm very rusty with Java, and I'm trying to re-learn/practice, so I'm starting almost at SQAURE-ONE.

Thanks in advance.
The eclipse program added this line of code to my MyDrawPanel inner class, but I don't understand why since the book didin't include it.

"private static final long serialVersionUID = 1L;"

Can anyone explain why?

8 years ago
I looked at your replies and took a second look at the code example in the book and realized I made a typing mistake.

I accidently forgot to put in the bracket to close the public class.

Thus making the SimpleFrame class into a inner class when it was only supposed to be a member class and complicated things.

The code runs fine.

But thanks for your suggestions.
9 years ago
I'm rusty with Java, so I'm practicing to improve my skills.
I found this code in the book JAVA FUNDAMENTALS Volume 1 Chapter 7
The code is to create a simple Jframe, but it’s a little advance from what I'm used to seeing.

It's missing an instance of the class TestGui to compile and run, but I'm not sure how to put in what's missing.

The code invokes the static method EventQueue.invokeLater which passes an anonymous inner class into the method argument.
The anonymous inner class is a thread

When I compile the code I get the following error:

Exception in thread "main" java.lang.Error: Unresolved compilation problem:
No enclosing instance of type TestGui is accessible. Must qualify the allocation with an enclosing instance of type TestGui (e.g. A() where x is an instance of TestGui).

at TestGui.main(

I understand what the error is saying but I don't know how to fix it.
Can someone help explain what's missing and how I should add it.
Thank You
BTW: The comments are mine, and not from the book

9 years ago
I agree, the new site isn't as good as the old one.
It's probably an indicator of things to come.
Hey, they might change the certifications and make it as confusing as the new Microsoft ones: MCIT-???
9 years ago
I know Oracle recently finished its acquistion of SUN Microsystems.
I went to look up some information on the SUN website and it redirected to Oracle.
Does anyone know how long ago the change was made?
I wonder what other changes are in store (other than more lay-offs).
I'm just curious.
9 years ago
I passed the SCJP6 with 61%.
It's not the score I wanted, but I'm still happy I passed.
This was a hard and tricky exam.
There were 60 questions:
- No serialization, or Scanner
- Plenty of OO concepts,
- Threads,
- Generics
- One wickedly difficult File I/O question.
- A lot more (which is a blur now)

It's been a long and hard road for me while studying for this exam because of a full time job, wife & kids and a busy personal life.

I had a large learning curve to overcome because I come from a non-programming background.

So I'm glad I won't have to spend all of my personal time studying anymore.

I would like to thank: (in no particular order)
-My family- for putting up with my long absences to study.

-Devaka Cooray- your examlab made the difference. I thought I had a good understanding of Java after completing K&B's SCJP6 study guide, but I was wrong.
I found your examlab so hard I almost quit several times!.
I didn't pass a single exam. But I'm glad I stuck it out and kept studying.

-Everyone here at the javaranch: Ankit, Costi, Henry Wong, Raju Champaklal, Bert bates, Punit, Deepak, K. Tsang, and many many more. You answered all of my questions and gave me good advice. I found a lot of answers to questions in the forums w/o posting.

-Kathy Sierra & Bert Bates- for the SCJP6 study guide and the Head First Java book, which was my intro into Java. If you're totally new to Java, like I was, then I recommend you read the Head First java book before moving on to other books.

-Please forgive me if I forget to thank anyone else

My Advice:
-Study like your life depends on it. Even though I didn't get the score I wanted, I felt studying gave me a firm foundation in Java. I work with a few java developers and they couldn't answer half of the practice questions, but they still knew their stuff.

-Take as many mock exams as necessary and then take some more. You may curse while taking them, but you'll be singing praises when the concepts become crystal clear.

-Write a lot of code. You can't seriously think you'll really understand Java very well if you don't write code. I re-wrote almost all of the code I found in the study guide and mock exams. You may pass the exam w/o practicing writing code, but I doubt you'll be able to write a decent program on your own w/o the book in front of you.

-Make the Java API your friend. Knowing the methods, packages and static field of classes will help you tremendously.

-Ask for help when you don't understand concepts: javaranch, Google, and co-workers/friends who know java are great resources.

My Next Step:
- Lots of sleep
- More sleep
- Opensource projects
- keep practicing

Thanks for reading my very long post.
9 years ago

Costi Ciudatu wrote:The section you got lost in is a regular expression, so it has little to do with the java.util.Scanner itself.
That regexp stands for the following sequence: a 'space': \\s followed by an upper-case letter: [A-Z] followed by 0 or more lower case letters: ([a-z])* and ended with a 'space': \\s. The only matching of this in your String is " Final ".
(\\s stands for more than the <space> character)

Thank You, Thank You. I was really over complicating it. That was a simple explaination, but to me it just looked difficult.
Thank You again for the quick response
Can someone help explain how the answer to this code turned out to be "> Final <"?

I get lost in the section: "("\\s[A-Z]([a-z])*\\s"))"

I understand that \\s is looking for white spaces, and [A-Z] is looking for capital letter between A-Z, but I get lost with the rest of the expression.

My scanner knowledge is weak, and I can't seem to figure the regex section of K&B SCJP6 study guide very well

I'm short on time and I would really, really appreciate a prompt response
-Thanks in advance
I have 2 questions about this:

1. Why does the method have the 2nd String Var-arg argument? It doesn't look to me like it's doing anything.
2. Inside the method:

how does this statement work?
Isn't the 1st argument of the method passing the pattern, and then we're casting it into a Pattern and invoking the compile method again

Any help on understanding the logic would be helpful

I'm located in the US job market and I'm watching the US job boards.
Despite the daily headlines of recovery here OR recovery there, the economy is still in a recession.

But after reading this forum, which started a year ago, it seems that recruiters are tightening their grip on the job market, which they always do in a recession.

Recruiters have been doing these practices for years. Flooding job boards with the same position, and 'resume gathering' to fill their databases. There is more competition for recruiters to position themselves for a job market rebound. They're waiting the job market to slowly thaw out, and then pounce.

It is surprising to hear of offshore recruiting companies getting involved.
Could it be there is the outsourcing of recruiting jobs that look for outsourced jobs, IRONIC?

It leaves the job searchers in a difficult position in a job market with:
-a glut of candidates
-Hiring managers looking for candidates with a good combination of skills that are "cost-effective" to fill the position
-Recruiters with huge databases of resumes and competitive recruiter fees.

We could talk to our congressmen, or debate the legality of these practices, but I think we should also focus our energies on alternative job search methods.

I suggest everyone should do their best to 'network' to rely a little less on this recruiter system.
The recruiter system can't be entirely eliminated, or avoided. I'm not advocating that because it is an important part of the job world.

I'd like to start a thread on the good ways to network to look for jobs as another alternative for job searches. If there already is such a thread please let me know.
9 years ago