Happy New Year

All
Currently I am using the BasicDnD example from http://java.sun.com/docs/books/tutorial/uiswing/misc/dnd.html as my target class, below is the abbot script fragment:<launch args="[]" class="BasicDnD" classpath=".;D:\workspace\eclipse\hello\bin" method="main" />
<sequence>
<action args="JTable Instance,(10%2c22)" class="javax.swing.JTable" method="actionDrag" />
<action args="JTextArea Instance,(10%2c10)" class="javax.swing.JTextArea" method="actionDrop" />
</sequence>
When I run it, the script doesn
t work the first time in neither robot or awt mode.
but when I run it in robot mode, u
sually it works after the first time. so if I put the fragment twice in my abbot script, the second one will work.
<launch args="[]" class="BasicDnD" classpath=".;D:\workspace\eclipse\hello\bin" method="main" />
<sequence>
<action args="JTable Instance,(10%2c22)" class="javax.swing.JTable" method="actionDrag" />
<action args="JTextArea Instance,(10%2c10)" class="javax.swing.JTextArea" method="actionDrop" />
<action args="JTable Instance,(10%2c22)" class="javax.swing.JTable" method="actionDrag" />
<action args="JTextArea Instance,(10%2c10)" class="javax.swing.JTextArea" method="actionDrop" />
</sequence>
I use the latest ABBot checked out from source forge cvs, jdk 1.5 and windows xp sp2.
When I check the AWT event queue, a
ctually the 1st time, I can only see the mouse move, click then move, then release events.
details as below:
============ 1st run ===================
java.awt.event.MouseEvent[MOUSE_MOVED,(31,84),button=0,clickCount=0] on frame5
java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=abbot.editor.LookAndFeelPreserver$LAFRestorer <at> 5b55a9,notifier=null,catchExceptions=false,when=1136147407034] on sun.awt.windows.WToolkit <at> 1abc7b9
java.awt.event.MouseEvent[MOUSE_PRESSED,(31,84),button=1,modifiers=Button1,extModifiers=Button1,clickCount=1] on frame5
java.awt.event.MouseEvent[MOUSE_DRAGGED,(42,94),button=0,modifiers=Button1,extModifiers=Button1,clickCount=0] on frame5
java.awt.SentEvent[] on sun.awt.windows.WToolkit <at> 1abc7b9
java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=abbot.tester.Robot$1 <at> 6458a6,notifier=abbot.tester.Robot$1RobotIdleLock <at> 7a3a30,catchExceptions=true,when=1136147407174] on sun.awt.windows.WToolkit <at> 1abc7b9
java.awt.event.Invoca
tionEvent[INVOCATION_DEFAULT,runnable=javax.swing.SystemEventQueueUtilities$ComponentWorkR
equest <at> 1e064c,notifier=null,catchExceptions=false,when=1136147407174] on sun.awt.windows.WToolkit <at> 1abc7b9
java.awt.event.PaintEvent[PAINT,updateRect=java.awt.Rectangle[x=0,y=0,width=815,height=523]] on frame5
java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=abbot.editor.ScriptEditor$27 <at> 1ec41c0,notifier=null,catchExceptions=false,when=1136147407355] on sun.awt.windows.WToolkit <at> 1abc7b9
java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=javax.swing.SystemEventQueueUtilities$ComponentWorkRequest <at> 18e4327,notifier=null,catchExceptions=false,when=1136147407355] on sun.awt.windows.WToolkit <at> 1abc7b9
java.awt.event.MouseEvent[MOUSE_DRAGGED,(471,132),button=0,modifiers=Button1,extModifiers=Button1,clickCount=0] on frame5
java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=abbot.editor.LookAndFeelPreserver$LAFRestorer <at> 1d0e2c9,notifier=null,catchExceptions=fals
e,when=1136147407365] on sun.awt.windows.WToolkit <at> 1abc7b9
java.awt.event.InvocationEven
t[INVOCATION_DEFAULT,runnable=javax.swing.Timer$DoPostEvent <at> 834af6,notifier=null,catchExceptions=false,when=1136147407465] on sun.awt.windows.WToolkit <at> 1abc7b9
java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=javax.swing.Timer$DoPostEvent <at> 834af6,notifier=null,catchExceptions=false,when=1136147407565] on sun.awt.windows.WToolkit <at> 1abc7b9
java.awt.event.MouseEvent[MOUSE_RELEASED,(471,132),button=1,modifiers=Button1,clickCount=1] on frame5
==========================================
the 2nd time, we can see the sun.awt.dnd.SunDropTargetEvent event in the EventQueue instead of MOUSE_RELEASED, and the whole queue contains a lot of awt dnd events.
============== 2nd run====================
java.awt.event.MouseEvent[MOUSE_MOVED,(31,84),button=0,clickCount=0] on frame5
java.awt.event.MouseEvent[MOUSE_PRESSED,(31,84),button=1,modifiers=Button1,extModifiers=Button
1,clickCount=1] on frame5
java.awt.event.MouseEvent[MOUSE_DRAGGED,(42,94),button=0,modi
fiers=Button1,extModifiers=Button1,clickCount=0] on frame5
java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=sun.awt.dnd.SunDragSourceContextPeer$1 <at> 1d590d,notifier=null,catchExceptions=false,when=1136147407905] on sun.awt.windows.WToolkit <at> 1abc7b9
java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=abbot.tester.Robot$1 <at> 6458a6,notifier=abbot.tester.Robot$1RobotIdleLock <at> c18e99,catchExceptions=true,when=1136147407996] on sun.awt.windows.WToolkit <at> 1abc7b9
java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=abbot.tester.Robot$1 <at> 6458a6,notifier=abbot.tester.Robot$1RobotIdleLock <at> 266b44,catchExceptions=true,when=1136147408006] on sun.awt.windows.WToolkit <at> 1abc7b9
java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=abbot.tester.Robot$1 <at> 6458a6,notifier=abbot.tester.Robot$1RobotIdleLock <at> 4c7e10,catchExceptions=true,when=1136147408006] on sun.awt.windows.WToolk
it <at> 1abc7b9
java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=abbot.editor.Scri
ptEditor$27 <at> 1e852be,notifier=null,catchExceptions=false,when=1136147408006] on sun.awt.windows.WToolkit <at> 1abc7b9
java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=javax.swing.SystemEventQueueUtilities$ComponentWorkRequest <at> 18e4327,notifier=null,catchExceptions=false,when=1136147408006] on sun.awt.windows.WToolkit <at> 1abc7b9
java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=abbot.editor.LookAndFeelPreserver$LAFRestorer <at> 190725e,notifier=null,catchExceptions=false,when=1136147408006] on sun.awt.windows.WToolkit <at> 1abc7b9
sun.awt.PeerEvent[INVOCATION_DEFAULT,runnable=sun.awt.dnd.SunDragSourceContextPeer$EventDispatcher <at> 92de02,notifier=null,catchExceptions=false,when=1136147408016] on javax.swing.JTable[,5,21,409x64,alignmentX=0.0,alignmentY=0.0,border=,flags=251658568,maximumSize=,minimumSize=,preferredSize=,autoCreateColumnsFromModel=true,autoResizeMode=AUTO_RESIZE_SUBS
EQUENT_COLUMNS,cellSelectionEnabled=false,editingColumn=-1,editingRow=-1,gridColor=javax.s
wing.plaf.ColorUIResource[r=122,g=138,b=153],preferredViewportSize=java.awt.Dimension[width=450,height=400],rowHeight=16,rowMargin=1,rowSelectionAllowed=true,selectionBackground=javax.swing.plaf.ColorUIResource[r=184,g=207,b=229],selectionForeground=sun.swing.PrintColorUIResource[r=51,g=51,b=51],showHorizontalLines=true,showVerticalLines=true]
sun.awt.dnd.SunDropTargetEvent[MOUSE_ENTERED,(467,132),button=0,clickCount=0] on frame5
sun.awt.PeerEvent[INVOCATION_DEFAULT,runnable=sun.awt.windows.WDropTargetContextPeer$1 <at> fd0a62,notifier=null,catchExceptions=false,when=1136147408056] on frame5
java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=javax.swing.SystemEventQueueUtilities$ComponentWorkRequest <at> 1e064c,notifier=null,catchExceptions=false,when=1136147408146] on sun.awt.windows.WToolkit <at> 1abc7b9
sun.awt.PeerEvent[INVOCATION_DEFAULT,runnable=sun.awt.dnd.SunDragSourceConte
xtPeer$EventDispatcher <at> b90a6e,notifier=null,catchExceptions=false,when=1136147408146] on j
avax.swing.JTable[,5,21,409x64,alignmentX=0.0,alignmentY=0.0,border=,flags=251658568,maximumSize=,minimumSize=,preferredSize=,autoCreateColumnsFromModel=true,autoResizeMode=AUTO_RESIZE_SUBSEQUENT_COLUMNS,cellSelectionEnabled=false,editingColumn=-1,editingRow=-1,gridColor=javax.swing.plaf.ColorUIResource[r=122,g=138,b=153],preferredViewportSize=java.awt.Dimension[width=450,height=400],rowHeight=16,rowMargin=1,rowSelectionAllowed=true,selectionBackground=javax.swing.plaf.ColorUIResource[r=184,g=207,b=229],selectionForeground=sun.swing.PrintColorUIResource[r=51,g=51,b=51],showHorizontalLines=true,showVerticalLines=true]
sun.awt.dnd.SunDropTargetEvent[MOUSE_DRAGGED,(467,132),button=0,clickCount=0] on frame5
sun.awt.PeerEvent[INVOCATION_DEFAULT,runnable=sun.awt.windows.WDropTargetContextPeer$1 <at> 114fc36,notifier=null,catchExceptions=false,when=1136147408146] on frame5
java.awt.event.I
nvocationEvent[INVOCATION_DEFAULT,runnable=javax.swing.SystemEventQueueUtilities$Component
WorkRequest <at> 1e064c,notifier=null,catchExceptions=false,when=1136147408146] on sun.awt.windows.WToolkit <at> 1abc7b9
java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=javax.swing.text.DefaultCaret$1 <at> ba5a81,notifier=null,catchExceptions=false,when=1136147408146] on sun.awt.windows.WToolkit <at> 1abc7b9
sun.awt.PeerEvent[INVOCATION_DEFAULT,runnable=sun.awt.dnd.SunDragSourceContextPeer$EventDispatcher <at> 1f9b804,notifier=null,catchExceptions=false,when=1136147408146] on javax.swing.JTable[,5,21,409x64,alignmentX=0.0,alignmentY=0.0,border=,flags=251658568,maximumSize=,minimumSize=,preferredSize=,autoCreateColumnsFromModel=true,autoResizeMode=AUTO_RESIZE_SUBSEQUENT_COLUMNS,cellSelectionEnabled=false,editingColumn=-1,editingRow=-1,gridColor=javax.swing.plaf.ColorUIResource[r=122,g=138,b=153],preferredViewportSize=java.awt.Dimension[width=450,height=400],rowHeight=16,rowMargin=1,rowSelectionA
llowed=true,selectionBackground=javax.swing.plaf.ColorUIResource[r=184,g=207,b=229],select
ionForeground=sun.swing.PrintColorUIResource[r=51,g=51,b=51],showHorizontalLines=true,showVerticalLines=true]
sun.awt.PeerEvent[INVOCATION_DEFAULT,runnable=sun.awt.dnd.SunDragSourceContextPeer$EventDispatcher <at> 1a0283e,notifier=null,catchExceptions=false,when=1136147408146] on javax.swing.JTable[,5,21,409x64,alignmentX=0.0,alignmentY=0.0,border=,flags=251658568,maximumSize=,minimumSize=,preferredSize=,autoCreateColumnsFromModel=true,autoResizeMode=AUTO_RESIZE_SUBSEQUENT_COLUMNS,cellSelectionEnabled=false,editingColumn=-1,editingRow=-1,gridColor=javax.swing.plaf.ColorUIResource[r=122,g=138,b=153],preferredViewportSize=java.awt.Dimension[width=450,height=400],rowHeight=16,rowMargin=1,rowSelectionAllowed=true,selectionBackground=javax.swing.plaf.ColorUIResource[r=184,g=207,b=229],selectionForeground=sun.swing.PrintColorUIResource[r=51,g=51,b=51],showHorizontalLines=true,showVerticalLines=
true]
java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=javax.swing.SystemEven
tQueueUtilities$ComponentWorkRequest <at> 1e064c,notifier=null,catchExceptions=false,when=1136147408146] on sun.awt.windows.WToolkit <at> 1abc7b9
sun.awt.dnd.SunDropTargetEvent[MOUSE_DRAGGED,(471,132),button=0,clickCount=0] on frame5
sun.awt.PeerEvent[INVOCATION_DEFAULT,runnable=sun.awt.dnd.SunDragSourceContextPeer$EventDispatcher <at> eeabe8,notifier=null,catchExceptions=false,when=1136147408146] on javax.swing.JTable[,5,21,409x64,alignmentX=0.0,alignmentY=0.0,border=,flags=251658568,maximumSize=,minimumSize=,preferredSize=,autoCreateColumnsFromModel=true,autoResizeMode=AUTO_RESIZE_SUBSEQUENT_COLUMNS,cellSelectionEnabled=false,editingColumn=-1,editingRow=-1,gridColor=javax.swing.plaf.ColorUIResource[r=122,g=138,b=153],preferredViewportSize=java.awt.Dimension[width=450,height=400],rowHeight=16,rowMargin=1,rowSelectionAllowed=true,selectionBackground=javax.swing.plaf.ColorUIResource[r=184,g=207,b
=229],selectionForeground=sun.swing.PrintColorUIResource[r=51,g=51,b=51],showHorizontalLin
es=true,showVerticalLines=true]
sun.awt.PeerEvent[INVOCATION_DEFAULT,runnable=sun.awt.windows.WDropTargetContextPeer$1 <at> 15837e8,notifier=null,catchExceptions=false,when=1136147408146] on frame5
sun.awt.dnd.SunDropTargetEvent[MOUSE_DRAGGED,(471,132),button=0,clickCount=0] on frame5
sun.awt.PeerEvent[INVOCATION_DEFAULT,runnable=sun.awt.dnd.SunDragSourceContextPeer$EventDispatcher <at> 1335b86,notifier=null,catchExceptions=false,when=1136147408196] on javax.swing.JTable[,5,21,409x64,alignmentX=0.0,alignmentY=0.0,border=,flags=251658568,maximumSize=,minimumSize=,preferredSize=,autoCreateColumnsFromModel=true,autoResizeMode=AUTO_RESIZE_SUBSEQUENT_COLUMNS,cellSelectionEnabled=false,editingColumn=-1,editingRow=-1,gridColor=javax.swing.plaf.ColorUIResource[r=122,g=138,b=153],preferredViewportSize=java.awt.Dimension[width=450,height=400],rowHeight=16,rowMargin=1,rowSelectionAllowed=true,selec
tionBackground=javax.swing.plaf.ColorUIResource[r=184,g=207,b=229],selectionForeground=sun
.swing.PrintColorUIResource[r=51,g=51,b=51],showHorizontalLines=true,showVerticalLines=true]
java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=abbot.tester.Robot$1 <at> 6458a6,notifier=abbot.tester.Robot$1RobotIdleLock <at> e29f36,catchExceptions=true,when=1136147408366] on sun.awt.windows.WToolkit <at> 1abc7b9
sun.awt.PeerEvent[INVOCATION_DEFAULT,runnable=sun.awt.windows.WDropTargetContextPeer$1 <at> 429be9,notifier=null,catchExceptions=false,when=1136147408196] on frame5
java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=javax.swing.Timer$DoPostEvent <at> 1c486f2,notifier=null,catchExceptions=false,when=1136147408196] on sun.awt.windows.WToolkit <at> 1abc7b9
java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=abbot.tester.Robot$1 <at> 6458a6,notifier=abbot.tester.Robot$1RobotIdleLock <at> 10a0d51,catchExceptions=true,when=1136147408396] on sun.awt.windows.WToolkit <at> 1abc7b9
sun.awt.dnd.S
unDropTargetEvent[MOUSE_DRAGGED,(471,132),button=0,clickCount=0] on frame5
sun.awt.Peer
Event[INVOCATION_DEFAULT,runnable=sun.awt.dnd.SunDragSourceContextPeer$EventDispatcher <at> 4a2dd4,notifier=null,catchExceptions=false,when=1136147408396] on javax.swing.JTable[,5,21,409x64,alignmentX=0.0,alignmentY=0.0,border=,flags=251658568,maximumSize=,minimumSize=,preferredSize=,autoCreateColumnsFromModel=true,autoResizeMode=AUTO_RESIZE_SUBSEQUENT_COLUMNS,cellSelectionEnabled=false,editingColumn=-1,editingRow=-1,gridColor=javax.swing.plaf.ColorUIResource[r=122,g=138,b=153],preferredViewportSize=java.awt.Dimension[width=450,height=400],rowHeight=16,rowMargin=1,rowSelectionAllowed=true,selectionBackground=javax.swing.plaf.ColorUIResource[r=184,g=207,b=229],selectionForeground=sun.swing.PrintColorUIResource[r=51,g=51,b=51],showHorizontalLines=true,showVerticalLines=true]
sun.awt.PeerEvent[INVOCATION_DEFAULT,runnable=sun.awt.windows.WDropTargetContextPeer$1 <at> 6f3ea,notifier=null,catchExcep
tions=false,when=1136147408246] on frame5
java.awt.event.InvocationEvent[INVOCATION_DEF
AULT,runnable=abbot.tester.Robot$1 <at> 6458a6,notifier=abbot.tester.Robot$1RobotIdleLock <at> 77baf4,catchExceptions=true,when=1136147408396] on sun.awt.windows.WToolkit <at> 1abc7b9
sun.awt.dnd.SunDropTargetEvent[MOUSE_DROPPED,(471,132)] on frame5
sun.awt.PeerEvent[INVOCATION_DEFAULT,runnable=sun.awt.dnd.SunDragSourceContextPeer$EventDispatcher <at> 1a0b94d,notifier=null,catchExceptions=false,when=1136147408396] on javax.swing.JTable[,5,21,409x64,alignmentX=0.0,alignmentY=0.0,border=,flags=251658568,maximumSize=,minimumSize=,preferredSize=,autoCreateColumnsFromModel=true,autoResizeMode=AUTO_RESIZE_SUBSEQUENT_COLUMNS,cellSelectionEnabled=false,editingColumn=-1,editingRow=-1,gridColor=javax.swing.plaf.ColorUIResource[r=122,g=138,b=153],preferredViewportSize=java.awt.Dimension[width=450,height=400],rowHeight=16,rowMargin=1,rowSelectionAllowed=true,selectionBackground=javax.swing.plaf.ColorUIResource[r
=184,g=207,b=229],selectionForeground=sun.swing.PrintColorUIResource[r=51,g=51,b=51],showH
orizontalLines=true,showVerticalLines=true]
java.awt.event.MouseEvent[MOUSE_MOVED,(471,132),button=0,clickCount=0] on frame5
==========================================
I am very confused in this scenario. any idea or thought will be appreciated.
John (Zuokun) Zhang
zuokunzhang <at> yahoo.com
2006-01-01