🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Default Push Button

#11136
From: Lars Roe
Date: Fri, 09 Jul 1999 00:00
25 lines
1477 bytes
Scott-

If you are making a standard dialog, try using:
JOptionPane.showMessageDialog(frame, "What you want to
display", Dialog title", JOptionPane.INFORMATION_MESSAGE);
Other than that, JBuilder has some nice dialog wizards if
you want something more customizable.

Scott Broderhausen wrote:
> 
> 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

-- 
Lars Roe
612-624-6711
roex0029@tc.umn.edu
Technical Details
Message-ID: <37866456.53C2F71B@tc.umn.edu>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7m5lpe$kmp2@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,c4ef4341a8cc789d
X-Google-Attributes: gid111d45,public
From: Lars Roe <roex0029@tc.umn.edu>
Subject: Re: Default Push Button
Date: 1999/07/09
Message-ID: <37866456.53C2F71B@tc.umn.edu>
X-Deja-AN: 499236005
Content-Transfer-Encoding: 7bit
References: <7m5lpe$kmp2@forums.borland.com>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Organization: UM
Mime-Version: 1.0
Reply-To: Lars.W.Roe-1@tc.umn.edu
Newsgroups: borland.public.jbuilder.java.swing