Article View: borland.public.jbuilder.java.swing
Article #349Re: overridden JTextField in JDialog
From: Kevin Dean [TeamB]
Date: Tue, 30 Aug 2005 12:37
Date: Tue, 30 Aug 2005 12:37
28 lines
2204 bytes
2204 bytes
Hiroshi wrote: > Hi everyone, a JTextField in a JDialog (or its extended class)ends up > with mostly-overridden by paint() for the dialog. Below is the code > to demonstrate the problem. When paint() is not included in the > dialog class, the field is normally shown, but with it, the field is > almost lost. Will you tell me why and how I can avoid this problem? > (I do need to include paint() in the dialog class.) Thank you. Unless you're doing something special to the way the dialog (or any component for that matter) is displayed, you should never have to override the paint() method. Furthermore, when overriding the paint() method, you should call the inherited paint() method which in the dialog's case ensures that all contained components are painted properly. -- Kevin Dean [TeamB] Dolphin Data Development Ltd. http://www.datadevelopment.com/ NEW WHITEPAPERS Team Development with JBuilder and Borland Enterprise Server Securing Borland Enterprise Server http://www.datadevelopment.com/papers/index.html Please see Borland's newsgroup guidelines at http://info.borland.com/newsgroups/guide.html
Technical Details
Message-ID:
<xn0e6lt523it6i004-kdean@www.teamb.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!newspeer.tds.net!38.119.100.82.MISMATCH!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<43112344$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,bf940752da9e232e
X-Google-Attributes: gid111d45,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Kevin Dean [TeamB]" <NkOdSePaAnM@datadevelopment.com>
Subject: Re: overridden JTextField in JDialog
Newsgroups: borland.public.jbuilder.java.swing
References: <43112344$1@newsgroups.borland.com>
Organization: Dolphin Data Development Ltd.
User-Agent: XanaNews/1.17.5.9
X-Face: ":yn4zt^A_dn>6~{YJmu^B\'4w)e:apPM\VC=Dvf&*tASxX9|BYczkFd$xr.$vNSZ[3Uobrp]c4\+\l){!WQI.$]veP({HLd;CDYH?iN
Message-ID: <xn0e6lt523it6i004-kdean@www.teamb.com>
X-Ref: newsgroups.borland.com ~XNS:000002E2
NNTP-Posting-Host: 70.27.188.228
Date: 30 Aug 2005 05:37:27 -0700
X-Trace: newsgroups.borland.com 1125405447 70.27.188.228 (30 Aug 2005 05:37:27 -0700)
Lines: 28
X-Authenticated-User: kdean
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!newspeer.tds.net!38.119.100.82.MISMATCH!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail