Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

JColorChooser default button, TableDialogEditDemo
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

Report this thread to moderator Post Follow-up to this message
Old Post
John B. Matthews
03-31-08 03:06 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Java Help archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:35 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.