🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #18034

2 repaint related questions

#18034
From: John Niesz
Date: Mon, 24 Aug 1998 00:00
21 lines
1694 bytes
ok, question number 1:  I created a dialog box to let the user change
the font for my program.  this dialog box has a TextField at the bottom
to preview the new font, but when the font is resized in the TextField,
it doesn't resize the TextField, even if i call repaint(), validate(),
pack(), or setSize(getSize()); validate(); after the call to setFont().
With large fonts this results in the lower portion of the font getting
cut off.  Is there any special reason for this?  Am I missing an
important function call before validate()?

question number 2:  that same program then goes on to store the new font
infrmation in a file that the other Frames and Dialogs read at
initialization to set their fonts.  However, existing windows do not
have their fonts updated, because they are not reinitialized.  With the
first program Frame, the one that runs the application, the font will
not change until the next time the program is run.  I realize that to
fix this I need to override one of the repaint() type functions, but I'm
not sure which one to override, and if i change the font before or after
calling super.some_repaint_func().

Thanks a lot for the help!!!
John
Technical Details
Message-ID: <35E22CD0.31D68FE8@worldnet.att.net>
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: f74b3,52f73c63ea297a1,start
X-Google-Attributes: gidf74b3,public
From: John Niesz <sunrunner15@worldnet.att.net>
Subject: 2 repaint related questions
Date: 1998/08/24
Message-ID: <35E22CD0.31D68FE8@worldnet.att.net>
X-Deja-AN: 384421862
Content-Transfer-Encoding: 7bit
Organization: Another Netscape Collabra Server User
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language