Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Developing accessible GUIs with Swing

Matt Chapman, Software engineer
Matt Chapman is a software engineer working on Java user interface development in the IBM e-Business Integrated Technologies centre in Hursley, UK. Since graduating with a B.Sc. in Computer Science from the University of Warwick in 1996, Matt has worked on Java virtual machine implementations and user interface technologies, and is also a Sun certified Java programmer. Contact Matt at mchapman@uk.ibm.com.
Samara Chenery, Software developer
Samara Chenery graduated with an Engineering Ph.D. from Imperial College in 1998. Since she joined IBM, she has worked on Java user interface development in the IBM e-Business Integrated Technologies centre in Hursley, UK. Working as a software developer, she has specialized in the areas of Swing and accessibility on IBM's Java SDK. Contact Samara at chenerys@uk.ibm.com.

Summary:  This tutorial provides in-depth techniques for addressing the key accessibility requirements of your Java GUI applications using the Swing toolkit. Follow along as IBM Java UI developers Matt Chapman and Samara Chenery examine solutions for handling some common accessibility problems.

Date:  17 Dec 2002
Level:  Introductory PDF:  A4 and Letter (156 KB | 24 pages)Get Adobe® Reader®

Activity:  8339 views
Comments:  

About this tutorial

What is this tutorial about?

An accessible Java graphical user interface (GUI) is one that has been developed to allow users with disabilities to use and interact with the GUI. With the aid of assistive technologies, such as screen magnifiers and screen readers, and the use of the keyboard, disabled users can have access to the same functionality as any other user.

The key criteria to consider when creating an accessible GUI are:

  • Working with screen readers: Some visually impaired users will need to rely completely on a screen reader to navigate and interact with a GUI.

  • Keyboard navigation: When using a screen reader, users will also need to navigate the GUI using the keyboard, because without knowledge of the mouse pointer's location they will not be able to use the mouse. Other users require keyboard navigation if they have problems manipulating a mouse.

  • Visual focus: Sighted users who have to navigate the GUI using the keyboard because they cannot manipulate a mouse, need visual indication of the focus. If they do not know where the focus is, they will have no idea how to keyboard navigate to their desired destination.

  • Supporting high contrast settings: Some visually impaired users need to magnify the font and increase the contrast of their display. An accessible GUI should reflect these changes.

With Java GUIs there are certain trouble spots where it becomes difficult to satisfy the above criteria. In this tutorial, we present a range of techniques to overcome some of these problems. In addition, we provide working code at j-accessgui.zip so you can compile and test the techniques for yourself.


Should I take this tutorial?

If you are a Java developer who wants to write accessible Java GUIs, then this tutorial is for you. However, this tutorial is not designed to be an introduction to writing accessible Java GUIs; rather, it serves as a guide on how to handle problem areas. Therefore, this tutorial is for the Java developer who:

  • Has already written accessible Java GUIs and would like to know how to overcome some of the common problem areas

  • Is learning how to write accessible Java GUIs and would like to know some of the problem areas to avoid

Prior to taking this tutorial, you should have a solid understanding of coding in the Java language and a basic understanding of how to make a Java GUI accessible. Barry Feigenbaum's recent article on developerWorks, "Coding for accessibility" (see Resources), provides a good introduction to this topic.


Requirements and code samples

To complete the examples in this tutorial, you will need J2SE version 1.3.1 or higher. The examples will work with versions 1.3.1, 1.4.0, or 1.4.1, unless stated otherwise. In these cases, functionality introduced in a new version has been exploited in the example code. You can download the sample code, j-accessgui.zip.

For the section Developing for screen readers , you will need a screen reader or other assistive technology that enables access to the accessible information provided by the Java GUI (see Resources).

1 of 8 | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Java technology
ArticleID=131457
TutorialTitle=Developing accessible GUIs with Swing
publish-date=12172002
author1-email=
author1-email-cc=
author2-email=
author2-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).