🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Customizing JOptionPane

#8150
From: John McGrath TeamB
Date: Wed, 18 Oct 2000 00:00
27 lines
1690 bytes
On Mon, 16 Oct 2000 09:45:05 -0400, Ernesto Bascon Pantoja wrote:

> Thanks for your answer, but, is it possible to modify the
> buttons labels at runtime (i.e., "Cancelar", "Abbruch",
> "Cancel", etc.) and to modify the message properties
> (font, colors, etc.)?

You can do whatever you want by installing your own UIDelegate for the 
JOptionPane.  Without doing that, you are restricted to modifying only 
some properties.  If Sun defined a way for you to modify the particular 
property, then you can do it, otherwise you can't.

I do not think Sun has documented those that can be set using UIDefaults.  
The best way to find those is to look in the source.  Most common ones 
will be found in the javax.swing.plaf.basic.BasicLookAndFeel class, and 
sometimes in the basic UIDelegate class (...BasicOptionPaneUI).  But the 
only way to know for sure is by looking at the LookAndFeel class and the 
UIDelegate class for each look-and-feel.

-- 
Regards,

John McGrath [TeamB]

---------------------------------------------------
Before sending me e-mail, please read:
    http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID: <MPG.14570cdf713ad57989c2b@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <39E730DD.EE4E12A@ucbcba.edu.bo> <MPG.1451d76989fa15a3989c17@forums.borland.com> <39EB0661.D21560E@ucbcba.edu.bo>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,fe3f49ab79d96316
X-Google-Attributes: gid111d45,public
From: John McGrath  [TeamB] <ng-b@JPMcGrath.net>
Subject: Re: Customizing JOptionPane
Date: 2000/10/18
Message-ID: <MPG.14570cdf713ad57989c2b@forums.borland.com>
X-Deja-AN: 682762234
References: <39E730DD.EE4E12A@ucbcba.edu.bo> <MPG.1451d76989fa15a3989c17@forums.borland.com> <39EB0661.D21560E@ucbcba.edu.bo>
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.swing