Posts Tagged "Java"

Interfaces and Drawing in Java, Hurray!

So I am cruising around the Dream.In.Code boards when I stumble across an interesting post about creating a shapes tool for a graphics Java program. If you are unfamiliar with the shapes tool, the idea is that you click a button, select a shape and then draw the shape onto some window of the program. Select a square, an ellipse or some fancy star and KAPOWY! you have a masterpiece ...

Inheriting From A Control in Java

I am sure we all love Java Swing. It is not quite as thrilling as the swings we use to play on at the park, but it sure makes our Java applications come alive with a nice rich GUI. We are familiar with the JButton to make buttons, JTextFields to make textboxes and perhaps you have even ventured into using JTables. But maybe some of these controls have not gone ...

Book Recommendations For A Variety of Languages

We have a lot of newbies on the forum these days. Again and again we are asked "What are some good books for language _______?" We all have our favorites and some books lean towards a certain learning style. So one programmer is going to like a particular book more than another programmer might. But besides that little glitch in perspective, there are some books that are generally accepted as ...

Making a Simple Test Harness

Again and again we get people on the Dream.In.Code board saying something along the lines of "I have this problem with my project, I think it is this function giving me the trouble, but can someone help me figure out what is going on?" What is the first thing the pros do in such a situation? They create what is known as a test harness (aka driver program) to test ...

Read File Into Array or ArrayList in C++/Java

On this entry we cover a question that appears a lot on the boards in a variety of languages. Reading lines of a file into an array, vector or arraylist. I have several examples lined up for you to show you some of the ways you can accomplish this in C++ as well as Java. Keep in mind that these examples are very simplistic in nature and designed to be ...

For Java DB Beginners – MS Access

Ok so you have played around with Java for awhile, written some functions, created a class or two and now you want to get into connecting Java to an example database. How do you start? Well most enterprise applications typically use Java with a more robust and powerful relational database than MS Access. But if you are just learning, and want something simple to play with, MS Access can be ...