Author Archives: felixzacat

Contructors and Inheritance in Javascript

  There is a really great article on inheritance in Javascript tucked away in the Rochester Institute of Technology website : http://www.cs.rit.edu/~atk/JavaScript/manuals/jsobj/ Dated from 1997 and very hard to find using Google, this article offered me the perfect solution to … Continue reading

Posted in JavaScript | Tagged , | Leave a comment

Abstract Methods and Polymorphism in Javascript.

JavaScript doesn’t allow abstract methods. If you are developing JavaScript in an object-oriented style, you need to be aware of what methods your object should or should not have. Inheritance allows for polymorphism, and achieving polymorphism is further enhanced by … Continue reading

Posted in JavaScript | Tagged , , , | Leave a comment

MVC pattern in Javascript. An example..

If you are unfortunate enough to be a Java developer who has to develop in Javascript, you will want to start using design patterns, or your javascript code is quickly going to resemble a train wreck. One of the most … Continue reading

Posted in Design Pattern, RIA | Tagged , , , | Leave a comment

Selenium tests over Multiple Browsers

The Selenium API is great for writing Java tests for web applications. An important aspect of it is the ability to quickly regression test over multiple browsers. A common pattern I ise is shown in the following code snippet. A … Continue reading

Posted in Design Pattern | Tagged , , , , | Leave a comment

Simple Pie Chart in Java Swing

I know there are a lot of Swing charting software libraries out there (JFreechart comes to mind). But a lot of them come across as too bloated and require a lot of time to become familiar with. My own Piechart … Continue reading

Posted in Swing | Tagged , , , | 5 Comments

Database Performance Tip, using a delete table to improve network performance.

Sometimes you want to display a large amount of data from a database table in your client application. One example from my past was a trading system built in Swing. The center piece of which contained a huge scrollable table … Continue reading

Posted in Uncategorized | Tagged , , , , | Leave a comment

Monty Hall Problem in Java

I recently stumbled across something called the Monty Hall Problem. It is a basic probability problem that seems mind blowingly non-intuative to most people. There are a lot of descriptions on this on the web, but basically the problem is … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

Setting a Conditional on a Breakpoint in Eclipse

Sometimes when you are debugging your program in Eclipse you will be using breakpoints within program loops. What can be really frustrating is when this loop is really large and the particular iteration you are interested is hundreds of iterations … Continue reading

Posted in Eclipse | Tagged , , , | Leave a comment

GridBagLayout Tutorial

This tutorial shows you how to construct a complex Java Swing GUI using the GridBagLayout. Let’s assume you have received a protoype sketch of how an application screen should look like, which you have been assigned to create : It … Continue reading

Posted in Swing | Tagged , , , , | 11 Comments

java.lang.VerifyError: Illegal target of jump or branch … possible cause!

I got this error the other day. It usually happens when you have crazy methods which are too long. But in my situation that wasn’t the case. I found out through trial and error that I was throwing a RuntimeException … Continue reading

Posted in Uncategorized | Tagged | Leave a comment