eventobject java.util object getsource() | awtevent java.awt int getid() - type of event | actionevent java.awt.event actionlistener - button,menuitem, textfield (enter),list( double click ) public void actionperformed(actionevent obj) actionevent string getactioncommand() int getmodifiers() alt_mask ctrl_mask shift_mask meta_mask itemlistener
(checkbox,choice,list,checkboxmenuitem)
public void itemstatechanged(itemevent obj) itemevent object getitem() object getitemselectable() int getstatechange() deselected selected adjustmentlistener (scrollbar) public void adjustmentvaluechanged(adjustmentevent obj) adjustmentevent object getadjustable() int getadjustmenttype() block_decrement block_increment track unit_decrement unit_increment textlistener
(textfield,textarea)
public void textvaluechanged(textevent obj) keylistener
keyadapter
public void keypressed(keyevent obj) public void keytyped(keyevent obj) public void keyreleased(keyevent obj) keyevent
void consume() char getkeychar() int getkeycode() vk_a to vk_z vk_0 to vk_9 vk_cancel vk_enter vk_alt vk_control vk_shift vk_escape vk_down vk_up vk_left vk_right vk_page_up vk_page_down vk_f1 to vk_f12 mouselistener public void public void public void public void public void
mouseadapter mouseentered(mouseevent obj) mouseexited(mouseevent obj) mousepressed(mouseevent obj) mousereleased(mouseevent obj) mouseclicked(mouseevent obj)
mousemotionlistener mousemotionadapter public void mousedragged(mouseevent obj) public void mousemoved(mouseevent obj) mouseevent int getx() int gety() point getpoint() x,y boolean ispopuptrigger() int getclickcount() 1.4 version int getbutton() nobutton
button1
button2
button3
mousewheellistener public void mousewheelmoved(mousewheelevent obj) mousewheelevent int getscrolltype() wheel_unit_scroll wheel_block_scroll int getscrollamount() int getwheelrotation() windowlistener public public public public public public public
void void void void void void void
windowadapter
windowactivated(windowevent obj) windowdeactivated(windowevent obj) windowopened(windowevent obj) windowclosed(windowevent obj) windowclosing(windowevent obj) windowiconified(windowevent obj) windowdeiconified(windowevent obj)
windowfocuslistener
(1.4)
windowfocusadapter
void windowgainedfocus(windowevent obj) void windowlostfocus(windowevent obj)
windowevent window getwindow() window getoppositewindow() componentlistener componentadapter public void componentmoved(componentevent obj) public void componentresized(componentevent obj) public void componentshown(componentevent obj) public void componenthidden(componentevent obj) componentevent component getcomponent() containerlistener
containeradapter
public void componentadded(containerevent obj) public void componentremoved(containerevent obj) containerevent container getcontainer() component getchild() focuslistener focusadapter void focusgained(focusevent obj) void focuslost(focusevent obj) focusevent component getoppositecomponent() class keyadapter implements keylistener { public void keypressed(keyevent obj){} public void keyreleased(keyevent obj){} public void keytyped(keyevent obj){} }