473,387 Members | 1,779 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

event handling with swing (ActionListener)

65
KeyListener listens keyboard strokes,
MouseListener listens mouse events, etc.

My question is about ActionListener.
what kind of events does ActionListener listen?

its name does not give much information, or does it listen all possible events?
can you give an example?
Sep 13 '07 #1
3 2773
r035198x
13,262 8TB
KeyListener listens keyboard strokes,
MouseListener listens mouse events, etc.

My question is about ActionListener.
what kind of events does ActionListener listen?

its name does not give much information, or does it listen all possible events?
can you give an example?
Not all possible events. Most common examples are Button click and enter on a TextField
Sep 13 '07 #2
stmfc
65
Not all possible events. Most common examples are Button click and enter on a TextField
where can i find the full list of these supported events?
i checked the jdk documentation, but could not find there.
Sep 13 '07 #3
JosAH
11,448 Expert 8TB
where can i find the full list of these supported events?
i checked the jdk documentation, but could not find there.
Key and Mouse (Motion) events are so called "low level" events. The other events
are "high level" events not directly caused by a device of some sort. The high
level events notify the listeners of bounded (or "vetoable") property changes and
(optionally) required actions. Note that most of Swings JComponents fire quite
a lot of those "high level" events in sequence when something simple such as a
mouse press happens: it could've been on a button that scrolls a list that hides,
exposes a certain element etc.

kind regards,

Jos
Sep 13 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Hal Vaughan | last post by:
I have a "wizard" type program with a series of panels that are placed in a JPanel. When the "Next >" button is pressed, I put in a new panel (in other words, the ActionListener for "Next >"...
1
by: Patrick Vanhoof | last post by:
Hi, I have a small program to test the ActionListener, but it gives errors. Here's part of the code: class ButtonListener implements ActionListener { public void actionPerformed(ActionEvent...
0
by: linux newbie | last post by:
is there any java expert could tell me what the problem below and explain the code to me, your explanation is greatly appreciated :) static Class class$java$awt$event$ActionListener; ...
1
by: Covad | last post by:
Hi all, For some reason my change() function is only called when the page loads. I'd much rather it gets called when the select changes. Here's the code: window.onload = init; function...
4
by: Eric | last post by:
How can I dynamically assign an event to an element? I have tried : (myelement is a text input) document.getElementById('myelement').onKeyUp = "myfnc(param1,param2,param3)"; ...
6
by: Amir Hardon | last post by:
I am dynamically adding rows to a table, and each row have a button which removes it. I have successfully implemented this for mozilla but I'm having troubles with IE, here is how I did it: ...
18
by: Christopher W. Douglas | last post by:
I am writing a VB.NET application in Visual Studio 2003. I have written a method that handles several events, such as closing a form and changing the visible status of a form. I have some code...
4
by: outofmymind | last post by:
Hi there, I did this program, but, im having problems with attaching the events. i want the total bill amount to be calculated when i click the ‘OK’ button, and i need it to be displayed in the...
1
by: Man4ish | last post by:
Hi, How Eventlistner can be used with rendred combo box. I got one example of combobox in table as follows . /* * Copyright (c) 1995 - 2008 Sun Microsystems, Inc. All rights reserved. * ...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.