What is the advantage of writing the button as a seperate class.
Like

private class button implements ActionListener
{
 public void actionPerformed (ActionEvent e){
{
}

chipsncoke

Modularity. That way you can use it in many places without having duplicate code.
It also keeps your classes small, which makes the code easier to read and maintain.

em.. i not really sure the advantage..
i juz noe.. it will mix up wif the other coding in e same class.. makin the whole process beta?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.