public void incometaxcreator()
{
JFrame incometaxframe = new JFrame("income tax generator");
JButton createincometax = new JButton("generate a list");
JTextArea outputbox = new JTextArea();
JTextArea inoutbox = new JTextArea();
incometaxframe.add(createincometax, BorderLayout.EAST);
incometaxframe.add(outputbox, BorderLayout.WEST);
incometaxframe.add(inoutbox, BorderLayout.CENTER);
outputbox.setPreferredSize(new Dimension (500,200));
incometaxframe.setVisible(true);
incometaxframe.setDefaultCloseOperation(incometaxframe.EXIT_ON_CLOSE);
incometaxframe.setPreferredSize(new Dimension (1000,400));
incometaxframe.pack();
//create the listener that generates the list
createincometax.addActionListener(new ActionListener( ) {
public void actionPerformed(ActionEvent e)
{
//get the information from the textarea and store as a string
String input= inoutbox.getText();
String output= input;
//create the patterns and matchers
Pattern student = Pattern.compile("cat");
Matcher studentmatcher = student.matcher(output);
output =studentmatcher.replaceAll(Current.getStudentName());
outputbox.setText(output);