Article View: borland.public.jbuilder.java.swing
Article #244JPanel.repaint( ) omited by the "drawing system"
From: Hiroshi Nakata
Date: Sat, 07 Apr 2007 06:21
Date: Sat, 07 Apr 2007 06:21
27 lines
2091 bytes
2091 bytes
When a Java app calls repaint() after JOptionPane.show***Dialog(),
the repaint() is ignored because closing the dlg triggers a repaint() from
the system, and the Java "drawing system" skips the 1st request (from the
Java app) and executes only the 2nd (from the system).
This leaves some region unmodified in a panel (to which repaint() is
triggered)
because the repaint() from the system repaints only 'dirty' region (ie
region
covered by the dlg). Here is a situation:
1)call repaint() to draw into a JPanel, jpnl, ie in jpnl.paintComponent(),
g.draw***() are called.
2)call JOptionPane.show***Dialog() which is covering jpnl.
3)close the dlg, triggering jpnl.repaint() by the system
4)set some change (according to the inputs in the dlg) into effects in jpnl
when drawn (such as new lines added)
5)call jpnl.repaint() to see the change.
Result is that 5) is not executed by the "drawing system" because of the
same call, jpnl.repaint(), in 3).
How can we force the "drawing system" not to skip consecutive repaint()
calls?
Or am I missing something?
Your suggestion or asnwer is greatly appreciated.
Technical Details
Message-ID:
<46170d67$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 111d45,46b9de0c8529390,start X-Google-Attributes: gid111d45,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Hiroshi Nakata" <hiroshinakata@hotmail.com> From: "Hiroshi Nakata" <hiroshinakata@hotmail.com> Newsgroups: borland.public.jbuilder.java.swing Subject: JPanel.repaint( ) omited by the "drawing system" Date: Fri, 6 Apr 2007 23:21:07 -0700 Lines: 29 Organization: N/A X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 74.119.19.143 Message-ID: <46170d67$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1175915879 74.119.19.143 (6 Apr 2007 20:17:59 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail