Replies: 2 comments 5 replies
-
On Windows it works! On Linux it works! |
Beta Was this translation helpful? Give feedback.
5 replies
-
it didn't work for me on my Linux machine: $ run_sketch test.py
py5 encountered an error in your code:
9 frame.setLayout(None)
10 frame.setBounds(100,100,300,200)
11 btn = JButton("Press me.")
12 btn.setBounds(100,60,100,24)
--> 13 btn.addActionListener(myBtnAction)
14 frame.add(btn)
..................................................
btn.addActionListener = <method 'javax.swing.AbstractButton.addActionListener' of ja
vax.swing.JButton[,100,60,100x24,invalid,alignmentX=0.0,alig
nmentY=0.5,border=javax.swing.plaf.BorderUIResource$Compound
BorderUIResource@2fe38db6,flags=296,maximumSize=,minimumSize
=,preferredSize=,defaultIcon=,disabledIcon=,disabledSelected
Icon=,margin=javax.swing.plaf.InsetsUIResource[top=2,left=14
,bottom=2,right=14],paintBorder=true,paintFocus=true,pressed
Icon=,rolloverEnabled=true,rolloverIcon=,rolloverSelectedIco
n=,selectedIcon=,tex...
..................................................
TypeError: No matching overloads found for javax.swing.AbstractButton.addActionListener(function), options are:
public void javax.swing.AbstractButton.addActionListener(java.awt.event.ActionListener) It could be the specific version of Java I am using: $ java -version
openjdk version "17.0.11" 2024-04-16
OpenJDK Runtime Environment (Red_Hat-17.0.11.0.9-1) (build 17.0.11+9)
OpenJDK 64-Bit Server VM (Red_Hat-17.0.11.0.9-1) (build 17.0.11+9, mixed mode, sharing) Based on what I've seen you do in other discussion threads, I suspect you are using something added to the Java API after Java 17. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
@hx2A
@villares
Does this fail on your system?
Beta Was this translation helpful? Give feedback.
All reactions