________________________________________________________________________

This file is part of Logtalk <http://logtalk.org/>  
Copyright 1998-2015 Paulo Moura <pmoura@logtalk.org>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
________________________________________________________________________


% start by loading the examples:

| ?- logtalk_load(jpl(examples)).
...


% get the Java version:

| ?- java('java.lang.System', Version)::getProperty('java.version').

Version = '1.7.0_51'
yes


% get the value of the "pi" constant:

| ?- java('java.lang.Math')::get_field('PI', Pi).

Pi = 3.141592653589793
yes


% create a new instance of ArrayList and add some elements to it:

| ?- java('java.util.ArrayList')::new(ArrayList), java(ArrayList)::(add('Paulo'), add('Carlos'), add('Helena')).
yes


% some GUI examples, adapted from the JPL distribution examples

| ?- color_chooser::color(Color).

Color = @'J#00000140727398998200'
yes

| ?- flags_table::display.
yes

| ?- jlist::display.
yes

| ?- text_entry::text(Text).
Text = ...
yes
