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]

Coding for accessibility

Use JFC/Swing to build accessibility into your Java applications

Return to article


Script to run source code

@echo off
echo To see the icons for this program, 
echo the images directory needs to be extracted from the a11ydemo.zip file.
echo Syntax: execAD1 [laf]   
echo where [laf] is the name of the look and feel class to use
echo use "java" for the Java look and Feel
echo use "windows" for the Windows look and Feel
echo use "motif" for the Motif look and Feel
if not %2.==. goto error
if %1.==. goto javalafx
if %1.==java. goto javalaf
if %1.==win. goto winlaf
if %1.==windows. goto winlaf
if %1.==motif. goto motiflaf
echo Unknown LAF name %1
goto done
:error
echo Extra parameters starting at %2 
goto done
:javalaf
:javalafx
set laf=java
goto run
:winlaf
set laf=com.sun.java.swing.plaf.windows.WindowsLookAndFeel
goto run
:motiflaf
set laf=com.sun.java.swing.plaf.motif.MotifLookAndFeel
:run
rem for exploded jar support 
set cp=-cp [your_dir]\classes
rem or for direct jar use
set cp=-cp [your_dir]\a11ydemo1.zip
rem a11yutils.output=true enables the output of the various outputters
java %cp%  "-Da11yutils.output=true" com.ibm.wac.demos.AccessibilityDemo1 %laf% 
:done 

Return to article