W11 E40 - Calculator -- Using JButtons from JPanel in ActionListener

51 views
Skip to first unread message

Vishal Ponugoti

unread,
Mar 31, 2016, 2:27:53 AM3/31/16
to mooc.fi
Hi,

I'm having problems with week 11 exercise 40.

I'm having trouble implementing a JPanel and using the JButtons in it with ActionListener. I initially created a method create a panel but I wasn't able to access the buttons in it for access in the listener class.

Please take a look at my code and let me know why my output field fails to update and how I could better implement my panel so I ideally don't have to create a new listener object and pass in all fields and buttons.


Best regards,

Vishal


Supported languages are English and Finnish

Please use our build in TMC Pastebin when asking questions related to your code  
 
TMC Plugin has built-in code sharing feature. 
In NetBeans, select TMC -> Send code to TMC pastebin. Copy the link you receive and paste it to your message.  

You may use our web interface to share code snippets: http://paste.mooc.fi
Reply all
Reply to author
Forward
0 new messages