[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-swing-dev
Subject:    Re: <Swing Dev> JDK-8178091 : Bug I will workin on
From:       Patrick Chen <chen.j.patrick () gmail ! com>
Date:       2017-04-17 10:42:24
Message-ID: CANmuJ8u0=fx6yKnQPCEU3mq_+ms+60NiYM6-PY8-k18PeaRw=Q () mail ! gmail ! com
[Download RAW message or body]

https://github.com/cloudStrif/webrev


2017-04-17 12:33 GMT+02:00 Patrick Chen <chen.j.patrick@gmail.com>:

> so here a webrev :
>
> 2017-04-12 23:41 GMT+02:00 Sergey Bylokhov <sergey.bylokhov@oracle.com>:
>
>> (CC) 2d-dev
>> If some of these options helps then most probably the bug is in the
>> Java2D pipeline(XRender?) and looks like this is duplicate of:
>> https://bugs.openjdk.java.net/browse/JDK-8068529
>>
>>
>>
>> OK ,
>> So I did severals tests with theses options with programms using full
>> repaint() method
>> ,and it still work well,
>> but occasionnaly ,the lag is here again ,particularly when there are a
>> lot component on the screen (Jpanel screen)
>>
>> indeed , I think it is not normal that we need theses options to work
>> well ,
>> but it seem the problem does not come from Swing package , but repaint()
>> method in AWT package ,
>>
>> 2017-04-12 21:26 GMT+02:00 Patrick Chen <chen.j.patrick@gmail.com>:
>>
>>> OK ,
>>> So I did severals tests with theses options with programms using full
>>> repaint() method
>>> ,and it still work well,
>>> but occasionnaly ,the lag is here again ,particularly when there are a
>>> lot component on the screen (Jpanel screen)
>>>
>>> indeed , I think it is not normal that we need theses options to work
>>> well ,
>>> but it seem the problem does not come from Swing package , but repaint()
>>> method in AWT package ,
>>>
>>>
>>>
>>> 2017-04-11 19:18 GMT+02:00 Sergey Bylokhov <sergey.bylokhov@oracle.com>:
>>>
>>>>
>>>> Hi ,
>>>> yes ;
>>>> with theses options it works !
>>>> but what that means ?
>>>>
>>>>
>>>> Is it works in case of any options or in some cases it does not work?
>>>> Please double check.
>>>>
>>>>
>>>> so it not a bug ?
>>>>
>>>> 2017-04-11 18:46 GMT+02:00 Sergey Bylokhov <sergey.bylokhov@oracle.com>
>>>> :
>>>>
>>>>> Hi, Patrick.
>>>>> Can you please run the code using these options:
>>>>> -Dsun.java2d.xrender=true
>>>>> -Dsun.java2d.xrender=false
>>>>> -Dsun.java2d.opengl=true
>>>>> -Dsun.java2d.opengl=false
>>>>>
>>>>>
>>>>>
>>>>> After tests it seems that the problem doesn't come from Timer , but
>>>>> the repaint() method ,
>>>>>
>>>>>
>>>>> even with this code the bug is here.
>>>>> the bug is on Linux.
>>>>>
>>>>> 2017-04-11 11:07 GMT+02:00 Walter Laan <WLaan@costengineering.eu>:
>>>>>
>>>>>> Note that the example code in JDK-8178091 sleeps on the EDT, so
>>>>>> you're lucky it paints at all instead of hanging the UI.
>>>>>>
>>>>>>
>>>>>>
>>>>>> It looks like you adapted the code from
>>>>>> http://codereview.stackexchange.com/questions/29630/simple-j
>>>>>> ava-animation-with-swing where no-one experienced with Swing pointed
>>>>>> out this error L.
>>>>>>
>>>>>>
>>>>>>
>>>>>> Using a javax.swing.Timer (not the java.util.Timer!) and it runs okay
>>>>>> (using Win10, Java 8u101):
>>>>>>
>>>>>>
>>>>>>
>>>>>>     *private* *void* go() {
>>>>>>
>>>>>>
>>>>>>
>>>>>>         *new* Timer(10, *new* ActionListener() {
>>>>>>
>>>>>>             // *Les* *coordonnées* *de* *départ* *de* *notre* *rond*
>>>>>>
>>>>>>             *private* *int* x = pan.getPosX(), y = pan.getPosY();
>>>>>>
>>>>>>             // *Le* *booléen* pour *savoir* *si* l'on *recule* *ou*
>>>>>> non *sur* l'axe x
>>>>>>
>>>>>>             *private* *boolean* backX = *false*;
>>>>>>
>>>>>>             // *Le* *booléen* pour *savoir* *si* l'on *recule* *ou*
>>>>>> non *sur* l'axe y
>>>>>>
>>>>>>             *private* *boolean* backY = *false*;
>>>>>>
>>>>>>
>>>>>>
>>>>>>             @Override
>>>>>>
>>>>>>             *public* *void* actionPerformed(ActionEvent e) {
>>>>>>
>>>>>>                 // *Si* *la* *coordonnée* x est *inférieure* à 1, on
>>>>>> *avance*
>>>>>>
>>>>>>                 *if*(x < 1) {
>>>>>>
>>>>>>                     backX = *false*;
>>>>>>
>>>>>>                 }
>>>>>>
>>>>>>                 // *Si* *la* *coordonnée* x est *supérieure* à *la*
>>>>>> *taille* *du* *Panneau* *moins* *la* *taille* *du* *rond*, on
>>>>>> *recule*
>>>>>>
>>>>>>                 *if*(x > pan.getWidth() - 50) {
>>>>>>
>>>>>>                     backX = *true*;
>>>>>>
>>>>>>                 }
>>>>>>
>>>>>>                 // *Idem* pour l'axe y
>>>>>>
>>>>>>                 *if*(y < 1) {
>>>>>>
>>>>>>                     backY = *false*;
>>>>>>
>>>>>>                 }
>>>>>>
>>>>>>                 *if*(y > pan.getHeight() - 50) {
>>>>>>
>>>>>>                     backY = *true*;
>>>>>>
>>>>>>                 }
>>>>>>
>>>>>>
>>>>>>
>>>>>>                 // *Si* on *avance*, on *incrémente* *la*
>>>>>> *coordonnée*
>>>>>>
>>>>>>                 // backX est *un* *booléen*, *donc* !backX *revient*
>>>>>> à *écrire*
>>>>>>
>>>>>>                 // if (backX == false)
>>>>>>
>>>>>>                 *if*(!backX) {
>>>>>>
>>>>>>                     pan.setPosX(++x);
>>>>>>
>>>>>>                 // *Sinon*, on *décrémente*
>>>>>>
>>>>>>                 }
>>>>>>
>>>>>>                 *else* {
>>>>>>
>>>>>>                     pan.setPosX(--x);
>>>>>>
>>>>>>                 }
>>>>>>
>>>>>>                 // *Idem* pour l'axe Y
>>>>>>
>>>>>>                 *if*(!backY) {
>>>>>>
>>>>>>                     pan.setPosY(++y);
>>>>>>
>>>>>>                 }
>>>>>>
>>>>>>                 *else* {
>>>>>>
>>>>>>                     pan.setPosY(--y);
>>>>>>
>>>>>>                 }
>>>>>>
>>>>>>
>>>>>>
>>>>>>                 // On *redessine* *notre* *Panneau*
>>>>>>
>>>>>>                 pan.repaint();
>>>>>>
>>>>>>             }
>>>>>>
>>>>>>         }).start();
>>>>>>
>>>>>>     }
>>>>>>
>>>>>>
>>>>>>
>>>>>> Hope that helps,
>>>>>>
>>>>>> Walter.
>>>>>>
>>>>>>
>>>>>>
>>>>>> *From:* swing-dev [mailto:swing-dev-bounces@openjdk.java.net] *On
>>>>>> Behalf Of *Patrick Chen
>>>>>> *Sent:* maandag 10 april 2017 12:23
>>>>>> *To:* swing-dev@openjdk.java.net
>>>>>> *Subject:* Re: <Swing Dev> JDK-8178091 : Bug I will workin on
>>>>>>
>>>>>>
>>>>>>
>>>>>> (edit : for example this game coded in java :
>>>>>> https://github.com/cloudStrif/GoldenSunD will work with java 7
>>>>>>
>>>>>> but clearly not with java8 (linux 64 bits) because of lags)
>>>>>>
>>>>>>
>>>>>>
>>>>>> 2017-04-10 12:19 GMT+02:00 Patrick Chen <chen.j.patrick@gmail.com>:
>>>>>>
>>>>>> Hi every one ,
>>>>>>
>>>>>> just wanted to inform that I am working to fix this bug.
>>>>>>
>>>>>>
>>>>>>
>>>>>> it is when we devellop animations thanks to repaint() method ,
>>>>>>
>>>>>> for java 7 it works well
>>>>>>
>>>>>> but with java8 not ,
>>>>>>
>>>>>> (linux 64 bits it doesn't really work )
>>>>>>
>>>>>>
>>>>>>
>>>>>> so after watching the source code it seem that it is not a swing
>>>>>> problem
>>>>>>
>>>>>> but AWT : Component.java .
>>>>>>
>>>>>>
>>>>>>
>>>>>> thank you
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>>
>

[Attachment #3 (text/html)]

<div dir="ltr"><a href="https://github.com/cloudStrif/webrev">https://github.com/cloudStrif/webrev</a><br><div><br></div></div><div \
class="gmail_extra"><br><div class="gmail_quote">2017-04-17 12:33 GMT+02:00 Patrick \
Chen <span dir="ltr">&lt;<a href="mailto:chen.j.patrick@gmail.com" \
target="_blank">chen.j.patrick@gmail.com</a>&gt;</span>:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">so here a webrev :  </div><div \
class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div \
class="gmail_quote">2017-04-12 23:41 GMT+02:00 Sergey Bylokhov <span dir="ltr">&lt;<a \
href="mailto:sergey.bylokhov@oracle.com" \
target="_blank">sergey.bylokhov@oracle.com</a>&gt;</span>:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div style="word-wrap:break-word"><div>(CC) 2d-dev</div>If \
some of these options helps then most probably the bug is in the Java2D \
pipeline(XRender?) and looks like this is duplicate of:<div><a \
href="https://bugs.openjdk.java.net/browse/JDK-8068529" \
target="_blank">https://bugs.openjdk.java.net/<wbr>browse/JDK-8068529</a></div><div><div \
class="m_2937220179101548331h5"><div><br><div><br><div><blockquote type="cite"><br \
class="m_2937220179101548331m_838713136622556381Apple-interchange-newline"><div><div \
dir="ltr"><div style="font-size:12.8px">OK ,  </div><div style="font-size:12.8px">So \
I did severals tests with theses options with programms using full repaint() \
method</div><div style="font-size:12.8px">,and it still work well,  </div><div \
style="font-size:12.8px">but occasionnaly ,the lag is here again ,particularly when \
there are a lot component on the screen (Jpanel screen)</div><div \
style="font-size:12.8px"><br></div><div style="font-size:12.8px">indeed , I think it \
is not normal that we need theses options to work well ,</div><div \
style="font-size:12.8px">but it seem the problem does not come from Swing package , \
but repaint() method in AWT package ,</div><div \
class="m_2937220179101548331m_838713136622556381gmail-yj6qo \
m_2937220179101548331m_838713136622556381gmail-ajU" \
style="font-size:12.8px"></div></div><div class="gmail_extra"><br><div \
class="gmail_quote">2017-04-12 21:26 GMT+02:00 Patrick Chen <span dir="ltr">&lt;<a \
href="mailto:chen.j.patrick@gmail.com" \
target="_blank">chen.j.patrick@gmail.com</a>&gt;</span>:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><div>OK ,  </div><div>So I did severals tests \
with theses options with programms using full repaint() method</div><div>,and it \
still work well,  </div><div>but occasionnaly ,the lag is here again ,particularly \
when there are a lot component on the screen (Jpanel \
screen)</div><div><br></div><div>indeed , I think it is not normal that we need \
theses options to work well ,</div><div>but it seem the problem does not come from \
Swing package , but repaint() method in AWT package \
,</div><div><br></div><div><br></div></div><div \
class="m_2937220179101548331m_838713136622556381HOEnZb"><div \
class="m_2937220179101548331m_838713136622556381h5"><div class="gmail_extra"><br><div \
class="gmail_quote">2017-04-11 19:18 GMT+02:00 Sergey Bylokhov <span dir="ltr">&lt;<a \
href="mailto:sergey.bylokhov@oracle.com" \
target="_blank">sergey.bylokhov@oracle.com</a>&gt;</span>:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span><blockquote \
type="cite"><div><div dir="ltr">Hi ,  <div>yes ;  <br><div>with theses options it \
works !  </div><div>but what that means ?  \
</div></div></div></div></blockquote><div><br></div></span><div>Is it works in case \
of any options or in some cases it does not work? Please double check.</div><div><div \
class="m_2937220179101548331m_838713136622556381m_6948471399694851929h5"><br><blockquote \
type="cite"><div><div dir="ltr"><div><div><br></div><div>so it not a bug ?  \
</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-04-11 \
18:46 GMT+02:00 Sergey Bylokhov <span dir="ltr">&lt;<a \
href="mailto:sergey.bylokhov@oracle.com" \
target="_blank">sergey.bylokhov@oracle.com</a>&gt;</span>:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div style="word-wrap:break-word">Hi, Patrick.<div>Can you \
please run the code using these \
options:</div><div>-Dsun.java2d.xrender=true<br>-Dsun.java2d.xrender=false<br>-Dsun.java2d.opengl=true<br>-Dsun.java2d.opengl=false</div><div><div \
class="m_2937220179101548331m_838713136622556381m_6948471399694851929m_-1181147467062262085h5"><div><br></div><div><br><div><blockquote \
type="cite"><br class="m_2937220179101548331m_838713136622556381m_6948471399694851929m_-1181147467062262085m_6670957414226390050Apple-interchange-newline"><div><div \
dir="ltr"><div>After tests it seems that the problem doesn&#39;t come from Timer , \
but  <br></div><div>the repaint() method ,  \
</div><div><br></div><div><br></div><div>even with this code the bug is \
here.</div><div>the bug is on Linux.</div></div><div class="gmail_extra"><br><div \
class="gmail_quote">2017-04-11 11:07 GMT+02:00 Walter Laan <span dir="ltr">&lt;<a \
href="mailto:WLaan@costengineering.eu" \
target="_blank">WLaan@costengineering.eu</a>&gt;</span>:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">





<div lang="NL" link="blue" vlink="purple">
<div class="m_2937220179101548331m_838713136622556381m_6948471399694851929m_-1181147467062262085m_6670957414226390050m_6914966552159833350WordSection1"><p \
class="MsoNormal"><span lang="EN-US" \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">Note \
that the example code in JDK-8178091 sleeps on the EDT, so you're lucky it paints at \
all instead of hanging the UI.<u></u><u></u></span></p><p class="MsoNormal"><span \
lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"><u></u> \
<u></u></span></p><p class="MsoNormal"><span lang="EN-US" \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">It \
looks like you adapted the code from <a \
href="http://codereview.stackexchange.com/questions/29630/simple-java-animation-with-swing" \
target="_blank"> http://codereview.stackexchang<wbr>e.com/questions/29630/simple-j<wbr>ava-animation-with-swing</a> \
where no-one experienced with Swing pointed out this error </span><span lang="EN-US" \
style="font-size:11.0pt;font-family:Wingdings;color:#1f497d">L</span><span \
lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">.<u></u><u></u></span></p><p \
class="MsoNormal"><span lang="EN-US" \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"><u></u> \
<u></u></span></p><p class="MsoNormal"><span lang="EN-US" \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">Using \
a javax.swing.Timer (not the java.util.Timer!) and it runs okay (using Win10, Java \
8u101):<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"><u></u> \
<u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">       </span><b><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#7f0055">private</span></b><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas"> </span><b><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#7f0055">void</span></b><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas"> go() {</span><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u>  <u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">               </span><b><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#7f0055">new</span></b><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas"> Timer(10, </span><b><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#7f0055">new</span></b><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas"> ActionListener() \
{</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                       </span><span \
style="font-size:10.0pt;font-family:Consolas;color:#3f7f5f">// <u>Les</u> \
<u>coordonnées</u> <u>de</u> <u>départ</u> <u>de</u> <u>notre</u> \
<u>rond</u></span><span \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span \
style="font-size:10pt;font-family:Consolas">                       </span><b><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#7f0055">private</span></b><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas"> </span><b><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#7f0055">int</span></b><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas"> </span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#0000c0">x</span><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas"> = </span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#0000c0">pan</span><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas">.getPosX(), </span><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#0000c0">y</span><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas"> = </span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#0000c0">pan</span><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas">.getPosY();</span><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                       </span><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#3f7f5f">// <u>Le</u> \
<u>booléen</u> pour <u>savoir</u> <u>si</u> l&#39;on <u>recule</u> <u>ou</u> non \
<u>sur</u> l&#39;axe x</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                       </span><b><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#7f0055">private</span></b><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas"> </span><b><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#7f0055">boolean</span></b><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas"> </span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#0000c0">backX</span><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas"> = </span><b><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#7f0055">false</span></b><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas">;</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                       </span><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#3f7f5f">// <u>Le</u> \
<u>booléen</u> pour <u>savoir</u> <u>si</u> l&#39;on <u>recule</u> <u>ou</u> non \
<u>sur</u> l&#39;axe y</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                       </span><b><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#7f0055">private</span></b><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas"> </span><b><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#7f0055">boolean</span></b><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas"> </span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#0000c0">backY</span><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas"> = </span><b><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#7f0055">false</span></b><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas">;</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u>  <u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                       </span><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#646464">@Override</span><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                       </span><b><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#7f0055">public</span></b><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas"> </span><b><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#7f0055">void</span></b><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas"> actionPerformed(ActionEvent \
</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#6a3e3e">e</span><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas">) {</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                               \
</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#3f7f5f">// <u>Si</u> <u>la</u> \
<u>coordonnée</u> x est <u>inférieure</u> à 1, on <u>avance</u></span><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                               \
</span><b><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#7f0055">if</span></b><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas">(</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#0000c0">x</span><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas">  &lt; 1) {</span><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                                       \
</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#0000c0">backX</span><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas"> = </span><b><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#7f0055">false</span></b><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas">;</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                               \
}</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                               \
</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#3f7f5f">// <u>Si</u> <u>la</u> \
<u>coordonnée</u> x est <u>supérieure</u> à <u>la</u> <u>taille</u> <u>du</u> \
<u>Panneau</u> <u>moins</u> <u>la</u> <u>taille</u> <u>du</u> <u>rond</u>, on \
<u>recule</u></span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                               \
</span><b><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#7f0055">if</span></b><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas">(</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#0000c0">x</span><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas">  &gt; </span><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#0000c0">pan</span><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas">.getWidth() - 50) \
{</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                                       \
</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#0000c0">backX</span><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas"> = </span><b><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#7f0055">true</span></b><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas">;</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                               \
}</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                               \
</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#3f7f5f">// <u>Idem</u> pour \
l&#39;axe y</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                               \
</span><b><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#7f0055">if</span></b><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas">(</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#0000c0">y</span><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas">  &lt; 1) {</span><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                                       \
</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#0000c0">backY</span><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas"> = </span><b><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#7f0055">false</span></b><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas">;</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                               \
}</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                               \
</span><b><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#7f0055">if</span></b><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas">(</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#0000c0">y</span><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas">  &gt; </span><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#0000c0">pan</span><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas">.getHeight() - 50) \
{</span><span lang="EN-US" \
</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#0000c0">backY</span><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas"> = </span><b><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#7f0055">true</span></b><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas">;</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                               \
}</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u>  <u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                               \
</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#3f7f5f">// <u>Si</u> on \
<u>avance</u>, on <u>incrémente</u> <u>la</u> <u>coordonnée</u></span><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                               \
</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#3f7f5f">// backX est <u>un</u> \
<u>booléen</u>, <u>donc</u> !backX <u>revient</u> à <u>écrire</u></span><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                               \
</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#3f7f5f">// if (backX == \
false)</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                               \
</span><b><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#7f0055">if</span></b><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas">(!</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#0000c0">backX</span><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas">)  {</span><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                                       \
</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#0000c0">pan</span><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas">.setPosX(++</span><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#0000c0">x</span><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas">);</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                               \
</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#3f7f5f">// <u>Sinon</u>, on \
<u>décrémente</u></span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                               \
}</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                               \
</span><b><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#7f0055">else</span></b><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas"> {</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                                       \
</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#0000c0">pan</span><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas">.setPosX(--</span><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#0000c0">x</span><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas">);</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                               \
}</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                               \
</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#3f7f5f">// <u>Idem</u> pour \
l&#39;axe Y</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                               \
</span><b><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#7f0055">if</span></b><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas">(!</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#0000c0">backY</span><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas">)  {</span><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                                       \
</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#0000c0">pan</span><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas">.setPosY(++</span><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#0000c0">y</span><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas">);</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                               \
}</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                               \
</span><b><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#7f0055">else</span></b><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas"> {</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                                       \
</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#0000c0">pan</span><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas">.setPosY(--</span><span \
lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#0000c0">y</span><span \
lang="EN-US" style="font-size:10pt;font-family:Consolas">);</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                               \
}</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u>  <u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                               \
</span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas;color:#3f7f5f">// On <u>redessine</u> \
<u>notre</u> <u>Panneau</u></span><span lang="EN-US" \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span lang="EN-US" \
style="font-size:10pt;font-family:Consolas">                               \
</span><span style="font-size:10.0pt;font-family:Consolas;color:#0000c0">pan</span><span \
style="font-size:10pt;font-family:Consolas">.repaint();</span><span \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span \
style="font-size:10pt;font-family:Consolas">                       }</span><span \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal" style="text-autospace:none"><span \
style="font-size:10pt;font-family:Consolas">               }).start();</span><span \
style="font-size:10.0pt;font-family:Consolas"><u></u><u></u></span></p><p \
class="MsoNormal"><span style="font-size:10pt;font-family:Consolas">       \
}</span><span lang="EN-US" \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"><u></u><u></u></span></p><p \
class="MsoNormal"><span lang="EN-US" \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"><u></u> \
<u></u></span></p><p class="MsoNormal"><span lang="EN-US" \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">Hope \
that helps,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">Walter.<u></u><u></u></span></p><p \
class="MsoNormal"><span lang="EN-US" \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"><u></u> \
<u></u></span></p><p class="MsoNormal"><b><span lang="EN-US" \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">From:</span></b><span \
lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"> \
swing-dev [mailto:<a href="mailto:swing-dev-bounces@openjdk.java.net" \
target="_blank">swing-dev-bounces@open<wbr>jdk.java.net</a>] <b>On Behalf Of \
</b>Patrick Chen<br> <b>Sent:</b> maandag 10 april 2017 12:23<br>
<b>To:</b> <a href="mailto:swing-dev@openjdk.java.net" \
target="_blank">swing-dev@openjdk.java.net</a><br> <b>Subject:</b> Re: &lt;Swing \
Dev&gt; JDK-8178091 : Bug I will workin on<u></u><u></u></span></p><div><div \
class="m_2937220179101548331m_838713136622556381m_6948471399694851929m_-1181147467062262085m_6670957414226390050h5"><p \
class="MsoNormal"><span lang="EN-US"><u></u>  <u></u></span></p> <div><p \
class="MsoNormal">(edit : for example this game coded in java :  <a \
href="https://github.com/cloudStrif/GoldenSunD" \
target="_blank">https://github.com/cloudStri<wbr>f/GoldenSunD</a> will work with java \
7<u></u><u></u></p> <div><p class="MsoNormal">but clearly not with java8 (linux 64 \
bits) because of lags)<u></u><u></u></p> </div>
</div>
<div><p class="MsoNormal"><u></u>  <u></u></p>
<div><p class="MsoNormal">2017-04-10 12:19 GMT+02:00 Patrick Chen &lt;<a \
href="mailto:chen.j.patrick@gmail.com" \
target="_blank">chen.j.patrick@gmail.com</a>&gt;:<u></u><u></u></p> <blockquote \
style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm \
6.0pt;margin-left:4.8pt;margin-right:0cm"> <div><p class="MsoNormal">Hi every one ,  \
<u></u><u></u></p> <div><p class="MsoNormal">just wanted to inform that I am working \
to fix this bug.<u></u><u></u></p> </div>
<div><p class="MsoNormal"><u></u>  <u></u></p>
</div>
<div><p class="MsoNormal">it is when we devellop animations thanks to repaint() \
method ,  <u></u><u></u></p> </div>
<div><p class="MsoNormal">for java 7 it works well  <u></u><u></u></p>
</div>
<div><p class="MsoNormal">but with java8 not ,  <u></u><u></u></p>
</div>
<div><p class="MsoNormal">(linux 64 bits it doesn&#39;t really work )  \
<u></u><u></u></p> </div>
<div><p class="MsoNormal"><u></u>  <u></u></p>
</div>
<div><p class="MsoNormal">so after watching the source code it seem that it is not a \
swing problem  <u></u><u></u></p> </div>
<div><p class="MsoNormal">but AWT : Component.java .<u></u><u></u></p>
</div>
<div><p class="MsoNormal"><u></u>  <u></u></p>
</div>
<div><p class="MsoNormal">thank you<u></u><u></u></p>
</div>
<div><p class="MsoNormal"><u></u>  <u></u></p>
</div>
<div><p class="MsoNormal"><u></u>  <u></u></p>
</div>
</div>
</blockquote>
</div><p class="MsoNormal"><u></u>  <u></u></p>
</div>
</div></div></div>
</div>

</blockquote></div><br></div>
</div></blockquote></div><br></div></div></div></div></blockquote></div><br></div>
</div></blockquote></div></div></div><br></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></blockquote></div><br></div></div></div></div></div></blockquote></div><br></div>
 </div></div></blockquote></div><br></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic