summaryrefslogtreecommitdiff
path: root/scripting/examples/beanshell
diff options
context:
space:
mode:
authorNoel Power <npower@openoffice.org>2003-03-13 07:00:24 +0000
committerNoel Power <npower@openoffice.org>2003-03-13 07:00:24 +0000
commit38381f2126d91b2e8b58130ed206065280ac9620 (patch)
treecca8d649b75ba6085d2082efb7f3daf276c84597 /scripting/examples/beanshell
parent5ce3eca124ad6dfb0a24d87078d687eff932b2ad (diff)
Committing on behalf of Neil Montgomery (code review updates)
Diffstat (limited to 'scripting/examples/beanshell')
-rw-r--r--scripting/examples/beanshell/Highlight/highlighter.bsh15
1 files changed, 13 insertions, 2 deletions
diff --git a/scripting/examples/beanshell/Highlight/highlighter.bsh b/scripting/examples/beanshell/Highlight/highlighter.bsh
index 8d9da4c7310d..2441db13b516 100644
--- a/scripting/examples/beanshell/Highlight/highlighter.bsh
+++ b/scripting/examples/beanshell/Highlight/highlighter.bsh
@@ -107,12 +107,25 @@ myListener = new ActionListener() {
}
};
+
+exitListener = new ActionListener() {
+ actionPerformed(ActionEvent e) {
+ frame.dispose();
+ }
+};
+
+
searchButton = new JButton("Highlight");
searchButton.addActionListener(myListener);
+exitButton = new JButton("Exit");
+exitButton.addActionListener(exitListener);
+
buttonPanel = new JPanel();
buttonPanel.setLayout(new FlowLayout());
buttonPanel.add(searchButton);
+buttonPanel.add(exitButton);
+
// Create a JPanel containing one JTextField for the search text.
searchPanel = new JPanel();
@@ -134,5 +147,3 @@ frame.getContentPane().add(buttonPanel);
frame.setVisible(true);
frame.pack();
-
-return 0;