File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mac closes multiple windows

 
Pres Brawner
Ranch Hand
Posts: 92
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Win OS based systems my code works. In Mac it fails. The system behavior is this: The base window is a JFrame. It has floating above it a JDialog. An error displays (JOptionPane).
User behavior: The user hits: ESC
Observered behavior (mac only): Both the JOptionPane error window, and the JDialog content window close.
Desired behavior: Only the JOptionPane window should close.
My code: Can't give you line by line, but the idea is that I have a KeyListener for the entire JDialog window. It catches all keyPressed. I have an event.consume(); in the keyPressed.
I put a System.out.println statement in the KeyPressed method. It only displays once suggesting that the keyPressed only gets processed once.
Is the super() method closing both windows?
Thanks everyone,
Pres
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic