1/**
2 * Copyright(C) 2003
3 * All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc..
4 *
5 * Permission to use, copy, modify, and distribute this
6 * software and its documentation for EDUCATIONAL purposes
7 * and without fee is hereby granted provided that this
8 * copyright notice appears in all copies.
9 *
10 * @date : June 1, 2003.
11 * @authorĀ : Salih Yurttas, Brian Autry.
12 */
13
14
15import javax.swing.*;
16import javax.swing.event.*;
17import java.awt.*;
18import java.awt.event.*;
19
20public class JDBCScriptRunnerInputPanel extends Panel {
21
22 private JTextField txtInput;
23 private JButton btnQuery;
24 private JScrollPane sPane;
25 private JTextArea txtOutput;
26 private JTextField txtFile;
27 private JButton btnFile;
28
29 public JDBCScriptRunnerInputPanel() {
30 txtInput = new JTextField("Input file",24);
31 add(txtInput);
32
33 btnQuery = new JButton("Query DB");
34 add(btnQuery);
35
36 txtOutput = new JTextArea("Output Area", 20, 35);
37 txtOutput.setEditable(false);
38
39 sPane = new JScrollPane(txtOutput);
40 add(sPane);
41
42 txtFile = new JTextField("Output file",24);
43 add(txtFile);
44
45 btnFile = new JButton("Save To File");
46 add(btnFile);
47
48 btnQuery.addActionListener(new JDBCScriptRunnerActionHandler
49 (txtOutput,txtInput));
50
51 btnFile.addActionListener(new JDBCScriptRunnerFileWriteActionHandler
52 (txtOutput,txtFile));
53 }
54
55}