command « Event « Java Swing Q&A





1. Action commands vs Action classes?    stackoverflow.com

A shout out to the Swing gurus out there!! I've been doing Swing programming for several years but have always been unclear on this. As you know Swing/AWT gives you several ways ...

2. Problems executing a command from Java    stackoverflow.com

I've built this actionPerformed method so that it reads a string I pass to the button (I needed to make my own button class to hold this new string) and depending ...

3. Apple Command Key    coderanch.com

4. Arrow key commands and paint method in canvas (mac vs pc)    coderanch.com

I think this is more than just beginner forum stuff (I may be wrong). First question, i have a paint command within a canvas class that doesn't seem to be recognised on PC's, but it is on macs, is there some different way you have to set it up on PC's? The code is exactly the same, i don't understand this ...

5. the only way to make it worse is to use action commands...    coderanch.com

You would have done better to add this query to the original thread about ActionListeners. The original posting was about what happens if you use your JFrame (etc) as an ActionListener; The reason it is wrong is that you will get a nasty block of if statements rather like this:- public class MyFrame extends JFrame implements ActionListener { . . . ...