Hi readers,
I've got problems with my KeyListener under Mac OS X
Here's the code snipped:
public class Foo extends JFrame implements ActionListener {
private Movie movie;
private MovieController mc;
//my own movie-controller class that holds additional buttons
private MyMovieController my_mc;
private Component c;
public Foo(File f) {
try {
QTFile qtFile = new QTFile(f);
movie = Movie.fromFile(OpenMovieFile.asRead(qtFile));
mc = new MovieController(movie);
QTComponent qc = QTFactory.makeQTComponent(mc);
c = qc.asComponent();
mc.setKeysEnabled(true);
mc.setPlayEveryFrame(true);
mc.enableEditing(true);
width = 720;
height = 576;
setSize(width, height);
getContentPane().setLayout(new BorderLayout());
getContentPane().add(c, BorderLayout.CENTER);
my_mc = new MyMovieController(movie);
getContentPane().add(my_mc, BorderLayout.SOUTH);
c.addKeyListener(new KeyAdapter() {
public void keyPressed(KeyEvent e) {
System.out.println(e);
}
});
setVisible(true);
} catch (StdQTException e) {
e.printStackTrace();
} catch (QTException e) {
e.printStackTrace();
}
}
Under Windows (WinXP with JRE 1.5.0_03) it works perfectly . I receive the
key events and also can navigate through the movie with the arrow-keys and
space/enter.
Under Mac OS X (10.3.5 with JRE 1.4.2_03) I don't get any key events.
I added the keyListener directly to the JFrame to receive the KeyEvents.
However the moviecontroller doesn't respond anymore.
Under Mac OS X (10.3.9 with JRE 1.4.2_05) it doesn't work both ways. I don't
get any KeyEvents from the JFrame nor the quicktime-component :(
Best regards
--
Weitersagen: GMX DSL-Flatrates mit Tempo-Garantie!
Ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl
_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-java mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-java/email@hidden
This email sent to email@hidden