Methods Summary |
---|
public void | actionPerformed(java.awt.event.ActionEvent evt)
Object source = evt.getSource();
if(source == searchButton)
{
String what = searchString.getText();
if(what == null || what.length() <= 0)
return;
JWhich jw = new JWhich(what);
pr(jw.getResult());
}
|
private void | addButtonPanel()
JPanel panel = new JPanel();
searchButton = new JButton("Search");//NOI18N
panel.add(searchButton);
searchButton.addActionListener(this);
Dimension d = searchButton.getPreferredSize();
d.setSize(450, d.getHeight());
searchString = new JTextField();
searchString.setPreferredSize(d);
panel.add(searchString);
searchString.addActionListener(this);
getContentPane().add(panel, "South");//NOI18N
|
private void | addTextPanel()
textArea = new JTextArea(800, 50);
scrollPane = new JScrollPane(textArea);
getContentPane().add(scrollPane, "Center");//NOI18N
|
public static void | main(java.lang.String[] args)
JWhichUI jwui = new JWhichUI();
jwui.show();
|
public void | pr(java.lang.String s)
//textArea.setText(textArea.getText() + s + "\n");//NOI18N
textArea.append(s + "\n");//NOI18N
|