11//
22// main.swift
3- // awt2
3+ // examples
44//
55// Created by John Holdsworth on 20/07/2016.
66// Copyright (c) 2016 John Holdsworth. All rights reserved.
77//
88
9- import Foundation
109import java_lang
1110import java_util
1211import java_awt
1312import javax_swing
1413
15- print ( Runtime . getRuntime ( ) . javaObject )
16- print ( Runtime . getRuntime ( ) . maxMemory ( ) )
14+ print ( String ( describing : Runtime . getRuntime ( ) . javaObject) )
15+ print ( String ( describing : Runtime . getRuntime ( ) . maxMemory ( ) ) )
1716let e = java_lang. Exception ( " JKKH " )
18- print ( e. javaObject )
19- print ( ClassNotFoundException ( casting: e) )
20- print ( Throwable ( casting: e) )
21- print ( Exception ( casting: e) )
22- print ( JavaClass ( casting: e) )
23- print ( System . getenv ( " HOME " ) )
17+ print ( String ( describing : e. javaObject) )
18+ print ( String ( describing : ClassNotFoundException ( casting: e) ) )
19+ print ( String ( describing : Throwable ( casting: e) ) )
20+ print ( String ( describing : Exception ( casting: e) ) )
21+ print ( String ( describing : JavaClass ( casting: e) ) )
22+ print ( String ( describing : System . getenv ( " HOME " ) ) )
2423print ( System . getProperty ( " java.class.path " ) )
2524print ( System . getProperty ( " java.version " ) )
2625print ( System . getProperty ( " java.vendor " ) )
@@ -59,7 +58,7 @@ JNI.background {
5958}
6059
6160JNI . background {
62- let myExample = SimpleJTreeExample ( " Simple JTree Example " )
61+ _ = SimpleJTreeExample ( " Simple JTree Example " )
6362}
6463
6564JNI . background {
@@ -76,7 +75,7 @@ Thread( {
7675} ) . start ( )
7776
7877JNI . background {
79- let philosophersFrame = PhilosophersJList ( )
78+ _ = PhilosophersJList ( )
8079}
8180
8281JNI . background {
@@ -101,7 +100,7 @@ JNI.background {
101100 f. setSize ( 200 , 300 )
102101 let cp = f. getContentPane ( ) !
103102 cp. setLayout ( nil )
104- // let names = ["Beate", "Claudia", "Fjodor", "Fred", "Friedrich", "Fritz", "Frodo", "Hermann", "Willi"]
103+ // let names = ["Beate", "Claudia", "Fjodor", "Fred", "Friedrich", "Fritz", "Frodo", "Hermann", "Willi"]
105104 // cBox = AutoComplete(items: names.map { JavaString( $0 ) })
106105 let locales = JavaLocale . getAvailableLocales ( ) !//
107106 cBox = AutoComplete ( items: locales)
0 commit comments