We’re rewarding the question askers & reputations are being recalculated! Read more.

New answers tagged

1

I'm on mobile so I'll be brief... You have 9 copy pasted buttons with identical behaviour, just a different label. Turn those into a reusable class that take the label and action listener as parameters. Instead of hard coding the phrase buttons into instance fields, define the phrases as array of strings and create the buttons from the array. You'll be able ...


0

I think I found a better architecture for my application by only using two classes, Controller and View, a swing class. So I rearranged for classes in to two. Controller: public class ClientRegistrationController implements InputDialogController { private int clientID; Client newClient = new Client(); private ClientRegistrationWindow ...


Top 50 recent answers are included