ASF Bugzilla – Attachment 32680 Details for
Bug 53347
<javac> fails by default on JDK 8
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Java8-Sample: Sourcecode
ListenerTest.java (text/x-java-source), 883 bytes, created by
Jan Mat
on 2015-04-23 06:24:11 UTC
(
hide
)
Description:
Java8-Sample: Sourcecode
Filename:
MIME Type:
Creator:
Jan Mat
Created:
2015-04-23 06:24:11 UTC
Size:
883 bytes
patch
obsolete
>// http://www.oracle.com/webfolder/technetwork/tutorials/obe/java/Lambda-QuickStart/index.html > >import javax.swing.*; >import java.awt.event.*; >import java.awt.BorderLayout; > >public class ListenerTest { > > public static void main(String[] args) { > JButton testButton = new JButton("Test Button"); > testButton.addActionListener(new ActionListener(){ > @Override public void actionPerformed(ActionEvent ae){ > System.out.println("Click Detected by Anon Class"); > } > }); > > testButton.addActionListener(e -> System.out.println("Click Detected by Lambda Listner")); > > // Swing stuff > JFrame frame = new JFrame("Listener Test"); > frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); > frame.add(testButton, BorderLayout.CENTER); > frame.pack(); > frame.setVisible(true); > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 53347
: 32680 |
32681