Skip to main content

skip to main content

developerWorks  >  Java technology  >

Coding for accessibility

Use JFC/Swing to build accessibility into your Java applications

developerWorks

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