MultiplicationTable #470
vsquared
started this conversation in
Show and tell
Replies: 3 comments 8 replies
-
Nice work, @vsquared ! Thanks for the screenshot. I tried running it on my (intel) Mac computer and got this error: py5 encountered an error in your code:
File "test.py", line 253, in _py5_faux_setup
245 def setup():
(...)
249 canvas = wnd.get_native()
250 frame = canvas.getFrame()
251 wnd.set_title('Multiplication Table')
252 frame.remove(canvas)
--> 253 buildWnd()
File "test.py", line 239, in buildWnd
228 def buildWnd():
(...)
235 leftLabelGrid()
236 correctLabel()
237 incorrectLabel()
238 scoreLabel()
--> 239 txtFldGrid()
240 resetBtn()
File "test.py", line 222, in txtFldGrid
200 def txtFldGrid():
(...)
218 fld.setBounds(left,top,w,h)
219 fld.setHorizontalAlignment(JTextField.CENTER)
220 fld.setForeground(Color.BLACK)
221 fld.setActionCommand(str(id))
--> 222 fld.addActionListener(txtFldAction)
223 txtFld.append(fld)
..................................................
fld.addActionListener = <method 'javax.swing.JTextField.addActionListener' of javax.
swing.JTextField[,60,80,40x24,invalid,layout=javax.swing.pla
f.basic.BasicTextUI$UpdateHandler,alignmentX=0.0,alignmentY=
0.0,border=com.apple.laf.AquaTextFieldBorder@49fa04e,flags=2
88,maximumSize=,minimumSize=,preferredSize=,caretColor=javax
.swing.plaf.ColorUIResource[r=0,g=0,b=0],disabledTextColor=j
avax.swing.plaf.ColorUIResource[r=128,g=128,b=128],editable=
true,margin=javax.swing.plaf.InsetsUIResource[top=0,left=0,b
ottom=0,right=0],sel...
..................................................
TypeError: No matching overloads found for javax.swing.JTextField.addActionListener(function), options are:
public synchronized void javax.swing.JTextField.addActionListener(java.awt.event.ActionListener) The window did open but there were no text boxes for answers. Any idea what could fix this? |
Beta Was this translation helpful? Give feedback.
0 replies
-
@villares Have you tried this on Linux? |
Beta Was this translation helpful? Give feedback.
3 replies
-
Thanks for testing. I really appreciate it. It has now been run on all three platforms so may be a keeper. Not sure what happened on hx2A's mac. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Demonstrates a multiplication table app for elementary school students.
Output:
Beta Was this translation helpful? Give feedback.
All reactions