Article View: borland.public.jbuilder.java.swing
Article #12960Background not painting in JDialog
From: Alex Humphreys
Date: Tue, 13 Oct 1998 00:00
Date: Tue, 13 Oct 1998 00:00
26 lines
1374 bytes
1374 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:
<3623A3E6.311A75DB@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: 111d45,c9aa87897a73bfc6,start X-Google-Attributes: gid111d45,public From: Alex Humphreys <ahumphreys@sema4.com> Subject: Background not painting in JDialog Date: 1998/10/13 Message-ID: <3623A3E6.311A75DB@sema4.com> X-Deja-AN: 400708348 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.swing