This week's book giveaways are in the iOS and Features new in Java 8 forums. We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line! See this thread and this one for details.
Barry, If you are doing this in Swing it is built in... just do:
In the code above it is actually the g key and not Alt-G that "presses" the button... but this is the easiest way to do it. If, on the other hand, you have your heart set on Alt-G, or you are using the AWT components, you will need to define a KeyListener for your components and test for an Alt-G combination. (Probably with a case statement that goes through all the keys you use and calls a method that is also called by the buttons ActionListener...) HTH, -Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.