Wednesday, July 30, 2008

Conquer Swing deficiencies in MDI development

Author: Gerald Nunn
URL: http://www.javaworld.com/javaworld/jw-05-2001/jw-0525-mdi.html?
Summary: You can easily overcome some notable Swing deficiencies when creating Multiple Document Interface (MDI) applications. In particular, this article shows you how to simply add scrolling and a standard windows menu to your MDI apps. (1,300 words)

Friday, March 28, 2008

Bar Exam Results Philippines 2007

Saturday, February 23, 2008

Java Array or Vector: What's the Difference?

Arrays and Vectors in Java are quite similar. They both represent a collection of similar items. For example, a good usage of an array would be a variable called states ( as in the United States of America).

String[] states = new String[50];

This is great for a collection of objects or primitive data types with an unchanging number of elements. We know that there are 50 states (I suppose that could change, but in general it is a fixed list). What do we do when we're not sure how many elements will be in our collection?

Use a Vector!

If you want to build a shopping list, you probably won't know how many items will be in the list, so a Vector would be great for this type of variable.

Vector myShoppingList= new Vector();
myShoppingList.addElement("bananas");
myShoppingList.addElement("milk");
myShoppingList.addElement("coffee");

I can keep adding elements to myShoppingList without knowing ahead of time how many items there will be. Thanks to seocontest2008 and pinoy money talk.