I don't want to change my code because I'm in a tight deadline.
I defined a subclass within another class but then I found out that I really need the subclass to be known at the top level because I need to control it's MouseListeners at the top level.
How to I return a CardLabel() class that is defined within HandPanel() class to the top level class?
CardLabel() class is NOT an instance of HandPanelPanel(). Instead it is subclass. I need the CardLabel() class to be known in the top level class so that I can control it in the Controller().
I'm so exhausted. I don't want to have change the way I have it but I need to controller the action of onclick.
public class HandPanel extends JPanel
public HandPanel(){
}
private class cardLabel extends JLabel implements MouseListener{
....
}
}
Please help. I'm stuck and haven't slept