The Artima Developer Community
Sponsored Link

Java Answers Forum
shortcut key to javax.swing.ProgressMonitor

2 replies on 1 page. Most recent reply: Nov 7, 2003 12:12 PM by Matt Gerrans

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
shibin

Posts: 2
Nickname: shibin
Registered: Nov, 2003

shortcut key to javax.swing.ProgressMonitor Posted: Nov 6, 2003 9:43 PM
Reply to this message Reply
Advertisement
How can I add a shortcut key to javax.swing.ProgressMonitor
It directly extends java.lang.Object. As it donot extend java.awt.Component I cannot add a java.awt.event.KeyListener.
Pls advice if by any way I can add a shortcut key.


shibin

Posts: 2
Nickname: shibin
Registered: Nov, 2003

Re: shortcut key to javax.swing.ProgressMonitor Posted: Nov 7, 2003 3:41 AM
Reply to this message Reply
To add to the question....I want to cancel the progress monitor for the short cut key combination ,say ALT + C.

Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: shortcut key to javax.swing.ProgressMonitor Posted: Nov 7, 2003 12:12 PM
Reply to this message Reply
It's been a while since I fooled with the ProgressMonitor (or Swing for that matter), but doesn't it have a cancel button? I think it should likewise support the the keyboard default for cancel, so pressing the Esc key should have the effect of clicking the button, unless Swing flaunts that particular standard. Outside of that, if you need special handling of a particular key, you might just create your own little progress display frame, then you could add whatever special handling you need.

Flat View: This topic has 2 replies on 1 page
Topic: Socket Previous Topic   Next Topic Topic: Applet - Remote DB connectivity

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use