Java Sample Code
-
Sending email using SMTP and Java
by Kevin Saitta
How to send an email using an SMTP server and Java
-
Generate PDFs using C# and the free iTextSharp library
by James Crowley
Learn how to use the free iTextSharp library to load a PDF form, populate some dynamic fields, and then save out a flat PDF file.
-
Calculate the difference between two dates, ignoring weekends
by joki
This code allows calculating with dates as if there were no weekends. To achieve this, days are numbered from Monday, 29 December 1969 without any intervening weekends (that is, five days per week). One purpose is to calculate the number of working days in a month, ignoring further public and bank holidays.
-
Compiling and executing Java Code in Visual Basic
by Obaid
If you are familiar with Java programming then you would probably know that one has to code in some text editor and then use Command Prompt to compile and run them by using the same old commands. Now that is indeed very annoying and of course there are many editor which allow you to compile and show the output of your code right there and then. Here I am going to show you how you can do this in Visual Basic. The program will ask for JDK Path and the Path of your code.
-
Installing and Using Java Look and Feels
by Michael H
Instructions for how to install and use java look and feels that you downloaded off the internet
-
Multiple Submit Buttons
by Kiran Pai
This script shows you how to submit the contents of a form to different programs depending on which Submit button you press.
-
Developing your first Visual WebGui application
by Guy Peled
An introduction to Visual WebGui through a sample application.
-
Visual WebGui a unique approach to AJAX development
by Guy Peled
Visual WebGui is not just another AJAX framework but rather a different approach to web application development, specially designed to simplify building highly complex applications like Outlook Web Access (OWA). Visual WebGui makes it possible for developers to create applications that were previously developed only by the "big guys".
-
opening a .net page in a new window
by chezhian
This script shows how to open a new page inside a new window rather than the existing window. You can also remove all the buttons and toolbars that exist in the standard browser window so that the entire new window is filled with only your content. You could either open an existing page or you could create dynamic content inside the new window.
-
Little Web Browser
by Michael H
A little web browser made from a JEditorPane and a JTextField and few JButtons. The code for the HyperlinkListener is straight from the api spec.
-
Dynamically filling ComboBoxes
by Kiran Pai
Filling the values of a dropdown SelectMenu depending on the selection in another Menu.
-
Debugging client JavaScript in VS 2005
by Jimmy Skowronski
Short guide how to debug client JavaScript in VS 2005.
-
Building a MultiDimensional Array in Javascript
by David Nishimoto
Building a MultiDimensional Array in Javascript
-
A simple way to read an XML file in Java
by Kiran Pai
This is the simplest way to read data from an XML file into a Java program. I have also included some basic error checking, so you can directly cut-paste this code with a few changes ofcourse.
-
Counting down with JavaScript
by Kiran Pai
How to display a countdown using different images and Javascript
-
Determining Client Capabilities
by Peeyush Nigam
Determine the capabilities of a client browser from the resolution to the user language.