Thomas Hawtin said something like:
<Anal Alert Claxon/> ("dwee dwee dwee dwee dwee...")
Because in its cleanest incarnation one would have expected Swing to have
the AWT as a dependency, *NOT* the other way around. It was originally
billed as a layered technology: having backward hooks from AWT to swing
gives me (and should give you) the technical term called The Heebeejeebees
(tm).
What you probably saw was a stack trace showing XAWT. XAWT is an
implementation of AWT components on X11 using Swing. In Mustang XAWT is
the default on both Linux and Solaris. You can still configure it to use
Motif.
I have a windows implementation and see a page+ of dependencies /anyway/, as
you suggest below with your "grep -R" suggestion. For yucks, I'll list them
here:
<@#$%ing Gross Pasted Example>
$ find . -type f -exec fgrep swing {} /dev/null \;
Binary file ./.Component.java.swp matches
../Button.java: * @see javax.swing.AbstractButton#isSelected()
../Component.java: * <a
href="
http://java.sun.com/docs/books/tutorial/uiswing/mis
c/focus.html">
../Component.java: Package swingPackage =
Package.getPackage("javax.swing"
);
../Component.java: if (klass.getPackage() == swingPackage &&
../Component.java: final Class swingClass = klass;
../Component.java:
return swingClass.getDeclaredMethods();
../Component.java: if (this instanceof javax.swing.JComponent) {
../Component.java: if (((javax.swing.JComponent)
this).isOpaque())
{
../Container.java:import javax.swing.JRootPane;
../Container.java: * <a
href="
http://java.sun.com/docs/books/tutorial/uiswing/mis
c/focus.html">
../Container.java: * @see javax.swing.JComponent#revalidate()
../Container.java: * @see javax.swing.JComponent#revalidate()
../Container.java: * @see javax.swing.JComponent#revalidate()
../Container.java: * @see javax.swing.JComponent#revalidate()
../Container.java: * @see javax.swing.JComponent#revalidate()
../Container.java: Component predictedFocusOwner = (this instanceof
javax
..swing.JInternalFrame) ?
((javax.swing.JInternalFrame)(this)).getMostRecentFocus
Owner() : null;
../datatransfer/DataFlavor.java: * <a
href="
http://java.sun.com/docs/books/tutori
al/uiswing/misc/dnd.html">
../datatransfer/Transferable.java: * <a
href="
http://java.sun.com/docs/books/tuto
rial/uiswing/misc/dnd.html">
../DefaultFocusTraversalPolicy.java: * <a
href="
http://java.sun.com/docs/books/tu
torial/uiswing/misc/focus.html">
../DefaultKeyboardFocusManager.java: * <a
href="
http://java.sun.com/docs/books/tu
torial/uiswing/misc/focus.html">
../dnd/DropTarget.java:import javax.swing.Timer;
../event/MouseWheelEvent.java: * @see javax.swing.JScrollPane
../event/MouseWheelEvent.java: * @see
javax.swing.JScrollPane#setWheelScrollingEn
abled(boolean)
../event/MouseWheelEvent.java: * @see
javax.swing.Scrollable#getScrollableUni
tIncrement
../event/MouseWheelEvent.java: * @see
javax.swing.Scrollable#getScrollableBlo
ckIncrement
../event/MouseWheelEvent.java: * @see javax.swing.Scrollable
../event/MouseWheelEvent.java: * @see
javax.swing.Scrollable#getScrollableUni
tIncrement
../event/MouseWheelEvent.java: * @see javax.swing.JScrollPane
../event/MouseWheelEvent.java: * @see
javax.swing.JScrollPane#setWheelScrolli
ngEnabled
../event/WindowListener.java: * @see <a
href="
http://java.sun.com/docs/books/tuto
rial/uiswing/events/windowlistener.html">Tutorial: How to Write Window
Listeners
</a>
../EventDispatchThread.java: if (modalComp instanceof
javax.swing.JInterna
lFrame) {
../FocusTraversalPolicy.java: * <a
href="
http://java.sun.com/docs/books/tutorial/
uiswing/misc/focus.html">
../Frame.java: * @see
javax.swing.JFrame#setDefaultLookAndFeelDecorated(bo
olean)
../Frame.java: * @see javax.swing.Icon
../Frame.java: * @see javax.swing.Icon
../im/spi/InputMethodContext.java:import javax.swing.JFrame;
../KeyboardFocusManager.java: * <a
href="
http://java.sun.com/docs/books/tutorial/
uiswing/misc/focus.html">
../MenuItem.java: * @see javax.swing.AbstractButton#isSelected()
../TextComponent.java:import javax.swing.text.AttributeSet;
../Toolkit.java: * <a
href="
http://java.sun.com/docs/books/tutorial/uiswing/misc/
focus.html#transferTiming">Timing
../Toolkit.java: * <a
href="
http://java.sun.com/docs/books/tutorial/uiswing/">The
Swing
../Toolkit.java: * <code>javax.swing.text.JTextComponent</code> already
adher
e to this
../Toolkit.java: * @see javax.swing.text.JTextComponent
$ pwd
/cygdrive/c/Java/jdk1.5.0/src/java/awt
$
Something similar to XAWT was planned for Windows, but it hasn't been
implemented yet.
There are also a couple of other dependencies. grep -R is your friend.
What I suggest you do is forget about ye olde AWT widgets and use Swing.
Good advice in general, and my consistent advice as well. However there
have been arguments made to me in the past for using AWT. The memory that
raises first in me noggin is a startup splash screen showing initialization
progress, because it loads in no time flat compared to swing. Or used to
anyway.
--
Unix users who vehemently argue that the "ln" command has its arguments
reversed do not understand much about the design of the utilities. "ln arg1
arg2" sets the arguments in the same order as "mv arg1 arg2". Existing file
argument to non-existing argument. And in fact, mv itself is implemented as
a
link followed by an unlink.