Tuesday, October 11, 2011

Digital clock by using Java

Here is a piece of code to build a Java clock, that uses threads, gets the data for time automatically and is not interrupted if you click something else on the window. There are some comments around the code to help you understand what's happening. import java.awt.*; import javax.swing.*;       import java.util.*; class Clock extends JFrame implements Runnable {   Thread runner; //declare global objects   Font clockFont;     ...

Convert Number to String

Convert Number to String in Java using Swing..... (Editor use: Net Bean) firstly create new project. in this project add one Java class file and name this file "EnglishNumberToWords.Java"  and copy following line of code in this file..... *************************Code******************************** package number; import java.text.DecimalFormat; public class EnglishNumberToWords {   private static final String[] tensNames = {     "",   ...

Upload and Retrieve image using JSP.

Upload and Retrieve image using JSP.            Hello friends,  I am write this blog for those programmer are required a code for “how to upload and retrieve images (photos) from server using JSP.” There is two jsp files are used in this project, and this project following libraries are required.         commons-fileupload.jar        commons-fileupload-1.2.1.jar        commons-io-1.4 this...

Send mail using Jsp and Servlet.

 Hello firends, using this blog you can send mail using JSP and Servlets, follow the following steps to design this application Send mail using Jsp and Servlet.    Create new web project using netbean.        For this project following 5 labraries are requered. a.       activation.jar b.      mail.jar c.       mailapi.jar d.      pop3.jar e.     ...