Article View: borland.public.jbuilder.java.language
Article #17677Background/image not painting in non-modal dialog
From: Alex Humphreys
Date: Fri, 16 Oct 1998 00:00
Date: Fri, 16 Oct 1998 00:00
28 lines
1394 bytes
1394 bytes
I have a non-modal Jdialog I'm using as a Wait screen and for some
reason the background isn't painting (it's transparent). The background
of the text fields are painting, so I get blotches of gray in my dialog
(it's really ugly).
I've tried pack(), validate(), repaint(), doLayout(), everything I could
think of, but nothing works. What am I missing?
Here's the relevant code:
private void jbInit(String message_str) throws Exception{
this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
xYLayout1.setWidth(300);
xYLayout1.setHeight(125);
lbc1.setText("Please wait...");
lbc2.setAlignment(Label.RIGHT);
lbc2.setText("..." + message_str);
panel1.setLayout(xYLayout1);
panel1.add(lbc1, new XYConstraints(10, 43, 272, 30));
panel1.add(lbc2, new XYConstraints(5, 67, 284, 30));
}
Thanks.
Alex
Technical Details
Message-ID:
<36278ACE.1C1E09D5@sema4.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,7024cc04da2b89ed,start X-Google-Attributes: gidf74b3,public From: Alex Humphreys <ahumphreys@sema4.com> Subject: Background/image not painting in non-modal dialog Date: 1998/10/16 Message-ID: <36278ACE.1C1E09D5@sema4.com> X-Deja-AN: 401873445 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