Back to Demo Go to Quotes
JAVA

Write once run everywhere !!!

There is no country in the world where coffee is such an important part of life as it is in Italy, my own country.
Related to this picture there is a programming language which I love:


Some people think that Java is slow.
Click on the applet to start. Use the arrow keys to move.
See if you can find Shirley.

Time to get a new Browser!



As a rule of thumb by using a just in time compiler Java is fast as C++.
In certain instance by using multithreading Java is much faster than C++.


  The Java Metal Look
What was the problem with AWT(Abstract Window Toolkit)?
Java with AWT creates a Pure Base Architecture, this was a quick way to have a platform independent language. This situation implies that Java did not have its own look but relay on the OS where the program was running and another problem was that not every OS support all the AWT components.
With Swing components:
Java becomes a Pluggable Look & Feel language with a wide choice of looks and feel of every single component (no matter what platform the program is running on). - note metal is the official Jaava look.
The following program gives you an idea of what I am talking about:
Download

  Few lines of code to get free drawing applet, but there is a little problem, what it is?
Download

  Networking
What takes pages and pages of code in other languages in Java will take few lines of code to build a Networking application, because this programming language is designed as an embedded system language.
An example to understand what happen when you log on to a web page.
Download

DataBase with Java

  Create an application named "PhoneBook.java" that will display a Main Menu with four buttons 'Add Entry', 'Update Entry', 'Delete Entry', 'Search'. When one of those buttons is clicked another frame is open and the icon 'phone.gif' is displayed in each frame.
I used setCursor(), setContentAreaFilled(), setFocusPainted(), setBorderPainted(), and setForeground() methods, to display the buttons properly.
When the 'Update Entry' button is clicked a small dialog box with prompting for the Name and Phone should be displayed. After pressing the 'Update Entry' button the Name and Phone number entered should be displayed in another dialog box where the user will have the opportunity to enter the Address, City, Province, Postal Code, and Phone (the Name text box must not editable).
If the "Cancel" button is clicked in any of the dialog boxes, the window should be closed.
This GUI implement a database driven phone book system. The database is named 'phone.mdb' and should have a DSN named phoneDSN. The database has one table named 'phone' with a structure where every field is a text field.
The first three field (name, address, city) are 20 characters wide, the province field is 3 characters wide, the pcode field is 7 characters wide, and the phone number filed is 12 characters wide.
When adding a record. Every field must contain data. A record cannot be added if the name and phone number already exist in the database. For example, Michael Furholter could be added twice under two different phone numbers but not with the same phone number. A record can be added that contains the same phone number as one that already exist as long as the name is different. If the data is invalid, a dialog box should be displayed indicating why is invalid. A dialog box should be displayed once a valid record is added.
When updating a record, the name should not be editable. Updated should not allow the same person's name twice if it contains the same phone number in the database. If an attempt is made to change the phone number to that matching a person with the same name, an error message should be displayed. A dialog box should be displayed when a record has been updated.
When deleting a record a dialog box should be displayed if the record does not exist. A dialog box should be displayed when the record has been deleted.
The result of a search should be displayed in a dialog box containing a JTable. A dialog box should be displayed, if no records were found.
Download