<Swing Dev> [9] Review Request: 6470361 Swing's Threading Policy example does not compile
    Alexander Zvegintsev 
    alexander.zvegintsev at oracle.com
       
    Mon Dec 15 14:39:36 UTC 2014
    
    
  
Hello Sergey,
I think that we should not use lambda expression here.
Someone who skimmed through these samples may not notice a lambda 
expression,
and write something like this later:
public class SomeClass implements Runnable {
     private final JFrame f = new JFrame(); // invoked on the main thread
     public SomeClass() {
         f.setBounds(100, 100, 100, 100); // invoked on the main thread
     }
     @Override
     public void run() {
         f.setVisible(true);
     }
     public static void main(String[] args) {
         SwingUtilities.invokeLater(new SomeClass());
     }
}
Or even better: we should clarify this somewhere explicitly.
Thanks,
Alexander.
On 12/12/2014 03:54 PM, Sergey Bylokhov wrote:
> Hello.
> Please review the small documentation fix for jdk 9.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-6470361
> Webrev can be found at: 
> http://cr.openjdk.java.net/~serb/6470361/webrev.00
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20141215/fa0904b2/attachment.html>
    
    
More information about the swing-dev
mailing list