Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-26-2008, 11:36 AM
Member
 
Join Date: Nov 2008
Posts: 3
Rep Power: 0
beasten is on a distinguished road
Default Create a shortcut
I've got a problem with a shortcut. In my program there's a list of books, and when I select a book there's a " Remove this book"-button. I need a shortcut to this removal-button. At first I solved it with Mnemonic, but thats no good. I dont want to press "alt+delete" to remove the selected book, I only want to press the "delete" button on the keyboard. Anyone knows how to create these type of shortcuts?
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 11-27-2008, 01:06 AM
Nicholas Jordan's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Southwest
Posts: 1,018
Rep Power: 3
Nicholas Jordan is on a distinguished road
Default
Keyboard Shortcutsclass googlem extends amazingDaze
__________________
Introduction to Programming Using Java.
Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 11-27-2008, 12:57 PM
Member
 
Join Date: Nov 2008
Posts: 3
Rep Power: 0
beasten is on a distinguished road
Default
Been readin that one before, tho I cant get it to work, nor the example. But I'll give it another try. Ta
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 11-27-2008, 05:53 PM
Nicholas Jordan's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Southwest
Posts: 1,018
Rep Power: 3
Nicholas Jordan is on a distinguished road
Default
What are the error messages?
__________________
Introduction to Programming Using Java.
Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 12-01-2008, 12:11 PM
Member
 
Join Date: Nov 2008
Posts: 3
Rep Power: 0
beasten is on a distinguished road
Default
I dont even get an error message. Been workin with accelerators now, but cant find out how to get it to work with no "ctrl+delete", just "delete". I think its something with the focus. Mabye I shouldnt try to bind my programmed button with the delete cmd, just get the selection in my list to get focus and then.. do something that deletes the item!?
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 12-02-2008, 01:29 AM
Nicholas Jordan's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Southwest
Posts: 1,018
Rep Power: 3
Nicholas Jordan is on a distinguished road
Default
It's been awhile, but I remeber focus traversal for buttons. I had a giant switch nearly wrote once trying to write a keyboard handler - I remember it can be done, runs something along the lines of if event.typeof == keyEvent ( or whatever the sytax is ) then you can track along a switch working as many as you want.

I forgot where it is,....
__________________
Introduction to Programming Using Java.
Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
System.out.println Shortcut AdamCCFC New To Java 15 05-27-2009 10:51 PM
eclipse keyboard shortcut taurean Eclipse 1 10-01-2008 01:09 PM
More than one KeyStroke (Shortcut) for a JMenuItem hannehomuth Advanced Java 0 07-25-2008 04:35 PM
Undo shortcut malfunctioning. Eranga NetBeans 0 03-31-2008 06:12 AM
How to add a shortcut key from JTextArea sukatoa Advanced Java 2 01-28-2008 09:39 AM


All times are GMT +2. The time now is 12:19 AM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org