Tuesday Jan 08, 2008

Quiz Answers

Answers to Quiz[Read More]

January 2008 Core Java Tech Tips Quiz

We've made it through another year, and it's time for another tech tips quiz.[Read More]

Wednesday Jan 02, 2008

Placing Components on Tabs

Learn how to create a JTabbedPane component container that accepts components placed within a panel for each tab.[Read More]

Monday Dec 03, 2007

Using Callable to Return Results From Runnables

Learn about the Callable interface, and its call method to return an Object.[Read More]

Wednesday Nov 28, 2007

Using the MBeanRegistration Interface to Manage MBean Life Cycles

This technical tip focuses using the MBeanRegistration interface to manage Management Bean (MBean) life cycles.[Read More]

Wednesday Sep 19, 2007

The Preferences API

There is more to the Preferences API than just getting and setting user specific settings. There are system preferences, import and export preferences, and event notifications associated with preferences. There is even a way to provide your own custom location for storage of preferences.[Read More]

Tuesday Sep 18, 2007

Using Enhanced For-Loops with Your Classes

The enhanced for-loop is a popular feature introduced with the Java SE platform in version 5.0. Its simple structure allows one to simplify code by presenting for-loops that visit each element of an array/collection without explicitly expressing how one goes from element to element.[Read More]

Thursday Aug 23, 2007

The Attach API

The Attach API allows you to attach to a target virtual machine (VM). By attaching to another VM, you can monitor what's going on and potentially detect problems before they happen.[Read More]

Monday Aug 20, 2007

Logging Localized Message

While the Logging API hasn't changed much since being introduced with the 1.4 release of Java SE, there are two things many people don't realize when they log a message.[Read More]

Wednesday Jul 25, 2007

The need for BigDecimal

Although programmers frequently use the float or double type to represent currency values, the BigDecimal class is more appropriate. This tips shows you the pitfalls of using a float or double, and shows how you should use BigDecimal instead.[Read More]

Tuesday Jul 17, 2007

Listeners vs Adapters

Working with the JavaBeans component model means that you'll interact with properties and events. You'll implement event listeners and adapters. What are the differences between a listener and adapter? When do you use one instead of the other? This tip answers those questions.[Read More]

Friday Jun 29, 2007

Adding Drop Support to JTree

The text components offer built-in drop support, as does the JColorChooser component, but adding drop support to any of the other Swing components -- like JList, JTable, or JTree -- requires a little bit of extra work.[Read More]

Monday Jun 25, 2007

Cookie Handling in Java SE 6

A quick look back to the J2SE 5.0 API brings you right to the abstract CookieHandler class but with no real implementation, no storage mechanism, no storage policy, and nothing to store. Jump ahead to Java SE 6, and the CookieManager class offers just such an implementation of CookieHandler. CookieStore is the storage mechanism, and CookiePolicy offers a policy for accepting or rejecting cookies. Lastly, HttpCookie is the object to store. [Read More]

Monday Jun 11, 2007

Using printf with Customized Formattable Classes

When your class implements the Formattable interface, the Formatter class can use it to customize output formatting. You are no longer limited to what is printed by toString() for your class.[Read More]

Wednesday Jun 06, 2007

Creating ZIP and JAR Files

ZIP files offer a packaging mechanism, allowing multiple files to be bundled together as one. Thus, when you need to download a group of files from the web, you can package them into one ZIP file for easier transport as a single file. The bundling can include additional information like directory hierarchy, thus preserving necessary paths for an application or series of resources once unbundled.

This tip will address three aspects of ZIP file usage:

  • creating them
  • adding files to them
  • compressing those added files
[Read More]
About

John O'Conner

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today