Checkers, anyone?

Checkers, anyone?

Explore the design and implementation of a Swing-based library that provides the user interface for the game of checkers.

JavaFX improvements in Java SE 8u40

JavaFX 8u40 added support for accessibility, standard and custom dialogs, a spinner control, and text formatting. Learn about these new capabilities in this installment of Java Q&A.

NIO.2 cookbook, Part 3

Leverage file-visitor, glob/pathmatcher, and directory-watcher features for advanced tasks in NIO.2.

NIO.2 cookbook, Part 2

Test out these recipes for obtaining paths and retrieving path information, testing files and directories, and working with attributes in NIO.2.

NIO.2 cookbook, Part 1

Start here, with three recipes for copying, deleting, and moving files using NIO.2.

Invokedynamic 101

What do you need to know about using invokedynamic and the java.lang.invoke API package in Java 7 and Java 8?

Customizing cell rendering

Swing's javax.swing.JList component and JavaFX's javafx.scene.control.ListView control let you customize how their various cells are rendered. In this post, I show you how to accomplish these tasks.

The ultimate superclass, Part 3

This post completes a three-part series in which I present and answer questions about Object and its methods.

The ultimate superclass, Part 2

Java beginners are invited to dig deeper into Java's ultimate superclass with this introduction to Object's finalize(), getClass(), and hashCode() methods.

The ultimate superclass, Part 1

This post launches a three-part series in which I present and answer questions about Object and its methods.

Reading and writing Excel spreadsheets

The open source community has created many open source Java projects, which range from charting software to game frameworks to word processors. In this post, I introduce an open source library project for reading and writing Microsoft...

Useful utility applications

Simple utility applications can be very helpful to Java developers. For example, you might need an application that generates a hexadecimal listing of a binary file.


The Java language's transient keyword isn't as well known as for , class , synchronized , and other familiar keywords; which makes it a perfect candidate for inclusion in a job interview questionnaire.

Collections framework idioms

Java's Collections Framework provides many convenient idioms for accomplishing common tasks (e.g., removing a collection's null elements). In this post, I present a handful of these idioms, which can help you write clearer and shorter...

Customizing Swing's file chooser

The javax.swing.JFileChooser class describes a Swing component for choosing files, usually via its int showOpenDialog(Component parent) and int showSaveDialog(Component parent) methods. In this post, I enumerate various ways to...

A new beginning

Welcome to Java Q&A . In this new blog, I answer all kinds of technical questions related to Java. Each post presents one or more Java questions (based on a theme) and offers answers.

Events and listeners

How do you create a custom event, and how do you fire it so that a component can get an event?