Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
Search the Tips
Tip Bank > Java > Java APIs

Java APIs - Page 3

AWT
Enterprise JavaBeans
JDBC
Swing
41-60 of 441     Previous     Next
Send All Your System Messages To File
by Kesav Kumar
Often, while developing a system you want to debug it using System.out.println or System.err.println. When development is over you would like to send all those messages to file. The easiest way ...
Creating an Object When its Class Is Unknown Before Runtime
by Nitin Garg
If you are writing an application in which you don't know the class of an object until runtime, then you cannot use the new operator to instantiate the object. This is because new does not take ...
Why You Shouldn
by Nitin Garg
There are fundamental incompatibilities between the ways AWT and Swing draw themselves. Swing classes are pure Java classes that look the same on all operating systems. AWT Java classes are not ...
Decoding the Application/x-www-form-urlencoded Data
by Sandeep Gain
The java.net.URLDecoder class has a static method to perform this decoding. The following code fragment resides in the doGet() or doPost() method of a servlet. The variable request is a javax.
The Protected Modifier
by Navneet Gupta
A protected feature of a class is available to all classes in the same package, just like a friendly feature. Moreover, a protected feature is available to all subclasses of the class that own ...
Making a Cookie Expire After a Specified Amount of Time
by Sandeep Gain
To specify an expiration time, you can use the setMaxTime(int) method of javax.servlet.http.Cookie. It takes as a parameter the number of seconds before the cookie will expire. For example, for a ...
System.out Vs. System.err
by Nitin Garg
System.out leads the output to the standard output stream (normally mapped to the console screen). System.err leads the output to the standard error stream (and, by default to the console, as ...
How to Read Client-Side Cookies From a Servlet
by Sandeep Gain
Reading cookies from a servlet is easy. You can gain access to any cookies sent by the browser from the javax.servlet.http.HttpServletRequest passed to the servlet's doGet, doPost, etc methods. ...
How to Write Underlined Text
by Shantanu Garg
Interestingly, underline is not a supported font style, i.e., you ...
Minimizing Flicker in Animation
by Nitin Garg
Flickering in animation is caused due to the default behavior ...
Setting the Default Memory Limit of the JVM
by Nitin Garg
To set the memory limits of the JVM in a Java application, run the program using following ...
Exchanging Data Between Java Applets and JavaScript
by Nitin Garg
Public methods and member variables of Java applets are visible to HTML documents. This makes the methods and variables can be accessed using JavaScript. The syntax for doing this is given ...
Viewing Error Outputs From Java Applets in IE
by Nitin Garg
The file Java/Javalog.txt in the Windows directory (i.e. C:\windows\Java.Javalog.txt for windows and C:\winnt\Java\Javalog.txt for NT) contains information for the last applet that was loaded by ...
Executing UNIX Shell Scripts From a Java Application
by Nitin Garg
To execute a UNIX shell script, first the shell needs to be executed. This can be done using an object of java runtime class.
How to Access Cookies Set at the Client Side
by Nitin Garg
Class javax.servlet.http.cookies can be used to access cookies on the client side. The following code demonstrates this technique. The code also checks for the cookie names in order to access the ...
Converting Strings Into Integers and Vice Versa
by Quan Tran
1) To convert a string into an ...
Another Way To Compare Strings
by Quan Tran
When comparing a string, you can use ...
Shortcut for System.out.println()
by Patrick Phillips
Tired of typing
Preparing a Log File With the Least File Operations
by Ravi Kant
In a big project involving several classes, logging error messages can be required. There are several ways to do this, but a simple approach is to open the log file in append mode, add the ...
Using the instanceof Keyword in Java
by Sandeep Gain
When you are typecasting and using instanceof keyword in Java, there are several things you should keep in mind. Consider the following example ...
41-60 of 441     Previous     Next
Sitemap