Answered by
vsquared
May 31, 2024
Replies: 3 comments 9 replies
|
Cheers @vsquared, I think you have a hint on the error message! You should start studying the Free ideas (maybe not great, but, hey, free!):
|
1 reply
|
from javax.swing import JFrame
f = JFrame('Hello, World!')
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE)
f.setSize(300, 300)
f.setLocationRelativeTo(None)
f.setVisible(True)In summary, on my system no py5, no swing This works from command line if you use the format shown below: import py5
from javax.swing import JFrame
def setup():
py5.get_surface().set_visible(False)
f = JFrame('Hello, World!')
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE)
f.setBounds(100, 100, 300, 300)
f.setVisible(True)
py5.run_sketch()cmd-line code for mac: |
8 replies
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment






Thanks for the suggestion to try module mode. If we accept the default layout manager for JFrame and give up setting the bounds for components, whatever we place in that JFrame will automatically resize when the window is resized. I've added a few components to the original demo and created a pretty nice editor with functional 'File/open'.