🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #11135

Default Push Button

#11135
From: Scott Broderhausen
Date: Fri, 09 Jul 1999 00:00
10 lines
1021 bytes
I am new to Java and am very used to the way the windows sdk handled
dialogs.  I want to have a default push button for my OK button.  I found
the setDefaultButton() call and it does make the OK button look like a
default push button but when I try to run the dialog and press the enter key
nothing happens.  If the OK button has the focus then it works.  However,
the point of a default push button is to be able to hit the enter key
without making the default button have the focus.  What do I need to do to
get this to work properly?

Scott
Technical Details
Message-ID: <7m5lpe$kmp2@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,c4ef4341a8cc789d,start
X-Google-Attributes: gid111d45,public
From: "Scott Broderhausen" <sbroder@xylan.com>
Subject: Default Push Button
Date: 1999/07/09
Message-ID: <7m5lpe$kmp2@forums.borland.com>
X-Deja-AN: 499222991
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
Organization: Alcatel USA
X-MSMail-Priority: Normal
Newsgroups: borland.public.jbuilder.java.swing