JavaBeat Feeds
|
|
|
|
|
|
|
Pages :
1
2
[Total Tips : 12]
|
|
|
Knowing about your Database
Author :
Christy
Date : Fri Oct 26th, 2007
We use the Jdbc APIs for accessing the data from the database system. However, the different databases from different vendors will vary a lot in their underlying model and functionalities. For example, a feature supported in one database might not be supported in another database. So, even before working with a database, it is important to know the supported features and other related information. Java provides an interface called DatabaseMetaData to achieve this.
Customizing Dragging and Dropping for Swing Components
Author :
Christy
Date : Fri Oct 26th, 2007
Swing's Drop and Drop API can be used for customizing Drag and Drop support. For most of the commonly used components like Text Components, Color Chooser, File Chooser etc, the dropping support is enabled by default. We have to explicitly enable the dragging support by calling the setDragEnabled() method. Before getting into customizing them, let us see a simple example,
Locking Files using Java
Author :
Christy
Date : Fri Oct 26th, 2007
File Locking can be achieved in java by making use of the New I/O API (nio). Before the advent of New I/O API, there was no direct support in Java for locking a file. It is important to understand that File locking is hugely dependent on the native operating system on which the program is executing.
File Upload and Download using Java
Author :
Muthukumar
Date : Wed Oct 10th, 2007
File Upload and Download is always a handy utility to know. There will be some need to upload a file to an FTP server, Like if you generate a report or store some data in .xls file, then it needs to be uploaded to a FTP server for further use. like wise we need to download some data (data stored in .xls files)for manuplation from the server in our projects. Here we have the code to do this for us. The FileUploadDownload utility.
Precise rounding of decimals using Rounding Mode Enumeration
Author :
Christy
Date : Tue Oct 9th, 2007
The Rounding Mode Enum in java.math package is used to perform precise rounding of decimal values. It was introduced in Java 5.0. This Enum provides various constants each of which is used for different modes of rounding. The decimal value would be rounded off to the number of decimal places based on the scale that is defined for the decimal value.
Using the Prototype pattern to clone objects
Author :
Christy
Date : Tue Oct 9th, 2007
Prototype pattern is one of the creational patterns that concentrate on duplicating objects if needed. Assuming that we are in process of creating a template. Most of the times, we copy an existing template, do some changes in it and then will use it.
Sending mail from Java
Author :
Christy
Date : Tue Oct 9th, 2007
The Java Mail API provides support for sending and receiving electronic mail messages. The API provides a plug-in architecture where vendor's implementation for their own proprietary protocols can be dynamically discovered and used at the run time. Sun provides a reference implementation and its supports the following protocols namely,
Passing arguments and properties from command line
Author :
Christy
Date : Tue Oct 9th, 2007
Arguments and properties can be passed to a java application from command line. In this techical tip, let us see how to pass arguments as well as properties from command line.
Generation of Random Numbers
Author :
Christy
Date : Tue Oct 9th, 2007
Random numbers in java can be generated either by using the Random class in java.util package or by using the random() method in the Math class in java.lang package.
Downloading Content from the Internet
Author :
Christy
Date : Tue Oct 9th, 2007
Let us write a Simple Downloader in this techincal tip by making use of the classes with java.net package. URL stands for Uniform Resource Locator and it is used to locate a resource in the Web in a standard fashion. A resource in the Web can be anything;
|
|
Pages :
1
2
|
|
|
|