Code Comments
Programming Forum and web based access to our favorite programming groups.I'm puzzled by the behavior of TableDialogEditDemo <http://java.sun.com/docs/books/tuto...zipfiles/compon ents-TableDialogEditDemoProject.zip> under Java 1.5.0_13, on Mac OS 10.4.11. The first time the JColorChooser dialog is displayed, the OK button is the default; on subsequent invocations, no default appears. The relevant code in CellEditor.java instantiates JColorChooser and creates a dialog colorChooser = new JColorChooser(); dialog = JColorChooser.createDialog(...) The code then reveals the dialog in the actionPerformed() method, when a table cell is clicked: dialog.setVisible(true); Although it's a bit slower, the problem does not occur if the dialog is re-created each time: newColor = JColorChooser.showDialog(null, "Choose...", currentColor); Is this a platform anomaly? Is there a way to set the default button before making the dialog visible? Thanks for any insights, John -- John B. Matthews trashgod at gmail dot com home dot woh dot rr dot com slash jbmatthews
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.