File: test_awt.py

package info (click to toggle)
python-jpype 0.6.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,560 kB
  • sloc: cpp: 11,957; python: 3,844; java: 986; ansic: 875; makefile: 149; xml: 76; sh: 62
file content (16 lines) | stat: -rw-r--r-- 330 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from jpype import *
import time

def run():
    print('Thread started')
    try:
        print(repr(java.awt.Frame))
        javax.swing.JFrame("Test Frame").setVisible(True)
        shutdownGuiEnvironment()
    except JException as ex :
        print(ex)


startJVM(getDefaultJVMPath())

setupGuiEnvironment(run)