You can tell what kinds of events a component can fire by looking at the kinds of event listeners you can register on it. For example, the JComboBox class defines these listener registration methods:

  • addActionListener
  • addItemListener
  • addPopupMenuListener

Form.KeyPress event (Access); 3 minutes to read; In this article. The KeyPress event occurs when the user presses and releases a key or key combination that corresponds to an ANSI code while a form or control has the focus. This event also occurs if you send an ANSI keystroke to a form or control by using the SendKeys action in a macro or the SendKeys statement in Visual Basic.

Thus, a combo box supports action, item, and popup menu listeners in addition to the listener methods it inherits from JComponent.

Listeners supported by Swing components fall into two categories:

Listeners that All Swing Components Support

Because all Swing components descend from the AWT Component class, you can register the following listeners on any Swing component:

component listener
Listens for changes in the component's size, position, or visibility.
focus listener
Listens for whether the component gained or lost the keyboard focus.
key listener
Listens for key presses; key events are fired only by the component that has the current keyboard focus.
mouse listener
Listens for mouse clicks, mouse presses, mouse releases and mouse movement into or out of the component's drawing area.
mouse-motion listener
Listens for changes in the mouse cursor's position over the component.
mouse-wheel listener
Listens for mouse wheel movement over the component.
Hierarchy Listener
Listens for changes to a component's containment hierarchy of changed events.
Hierarchy Bounds Listener
Listens for changes to a component's containment hierarchy of moved and resized events.

All Swing components descend from the AWT Container class, but many of them are not used as containers. So, technically speaking, any Swing component can fire container events, which notify listeners that a component has been added to or removed from the container. Realistically speaking, however, only containers (such as panels and frames) and compound components (such as combo boxes) typically fire container events.


JComponent provides support for three more listener types. You can register an ancestor listener to be notified when a component's containment ancestors are added to or removed from a container, hidden, made visible, or moved. This listener type is an implementation detail which predated hierarchy listeners.

Jpanel Doesn't Generate Key Event 2017

The other two listener types are part of the Swing components' conformance to the JavaBeans specification. Among other things, this means that Swing components support bound and constrained properties and notify listeners of changes to the properties. Property change listeners listen for changes to bound properties and are used by several Swing components, such as formatted text fields, to track changes on a component's bound properties. Also, property change listeners, as well as vetoable change listeners are used by builder tools to listen for changes on constrained properties. For more information refer to the Properties lesson in the JavaBeans trail.

Other Listeners that Swing Components Support

The following table lists Swing components and the specialized listeners they support, not including listeners supported by all Components, Containers, or JComponents. In many cases, the events are fired directly from the component. In other cases, the events are fired from the component's data or selection model. To find out the details for the particular component and listener you are interested in, go first to the component how-to section, and then if necessary to the listener how-to section.

This table lists Swing components with their specialized listeners
ComponentAction ListenerCaret ListenerChange ListenerDocument Listener,
Undoable Edit Listener
Item ListenerList Selection ListenerWindow ListenerOther Types of Listeners
check box
color chooser
combo box
editor panehyperlink
file chooser
formatted text field
internal frameinternal frame
listlist data
menu itemmenu key
menu drag mouse
option pane
password field
popup menupopup menu
progress bar
radio button
tabbed pane
tabletable model
table column model
cell editor
text area
text field
text panehyperlink
toggle button
treetree expansion
tree will expand
tree model
tree selection
(used by scrollpane)

This section shows how to programmatically generate a SAS token for using the Event Hubs REST APIs.








Note: The following snippet requires OpenSSL and jq.

Using the Shared Access Signature (at HTTP level)

Now that you know how to create Shared Access Signatures for any entities in Service Bus, you are ready to perform an HTTP POST:

Jpanel Doesn't Generate Key Event 2018

Remember, this SAS key works for everything. You can create SAS for a queue, topic, subscription, Event Hub, or relay. If you use per-publisher identity for Event Hubs, you can append /publishers/< publisherid>.

Jpanel Doesn't Generate Key Event Calendar

If you give a sender or client a SAS token, they don't have the key directly, and they cannot reverse the hash to obtain it. As such, you have control over what they can access, and for how long. An important thing to remember is that if you change the primary key in the policy, any Shared Access Signatures created from it is invalidated.

Coments are closed
Scroll to top