Java Code Examples for java.awt.Button#getName()
The following examples show how to use
java.awt.Button#getName() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: UpdatePopupMenu.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
@Override public void actionPerformed(ActionEvent ae) { if (ae.getSource() instanceof Button) { Button btn = (Button) ae.getSource(); switch (btn.getName()) { case "Pass": testPassed = true; isInterrupted = true; mainThread.interrupt(); break; case "Fail": testPassed = false; isInterrupted = true; mainThread.interrupt(); break; } } }
Example 2
Source File: RestoreActiveWindowTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
@Override public void actionPerformed(ActionEvent ae) { if (ae.getSource() instanceof Button) { Button btn = (Button) ae.getSource(); switch (btn.getName()) { case "Pass": testPassed = true; isInterrupted = true; mainThread.interrupt(); break; case "Fail": testPassed = false; isInterrupted = true; mainThread.interrupt(); break; } } }
Example 3
Source File: DragLinkFromBrowser.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
@Override public void actionPerformed(ActionEvent ae) { if (ae.getSource() instanceof Button) { Button btn = (Button) ae.getSource(); switch (btn.getName()) { case "Pass": testPassed = true; isInterrupted = true; mainThread.interrupt(); break; case "Fail": testFailed("Dragging link from web browser Failed"); break; } } }