Code:
ActionListener listenerB = new ActionListener() {
public void actionPerformed(ActionEvent ev)
{
try
{
fStack.push("[URL unfurl="true"]http://"[/URL] + address.getText().toLowerCase());
html.setPage((String) bStack.pop());
}
catch( Exception ex ) { new JOptionPane("Illegal URL, try again");}
}
};
ActionListener listenerF = new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
bStack.push("[URL unfurl="true"]http://"[/URL] + address.getText().toLowerCase());
html.setPage((String) fStack.pop());
} catch( Exception ex ) { new JOptionPane("Illegal URL, try again");}
}
};
back.addActionListener(listenerB);
forward.addActionListener(listenerF);
Code:
final Stack fStack = new Stack();
final Stack bStack = new Stack();
Can anyone see why this wont work? I wash for them to go back and forth like a webbrowser?