aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorjestin2002-06-07 11:25:57 +0000
committerjestin2002-06-07 11:25:57 +0000
commitc3ef99ea8cf40c894b42fc1cb6f88c627b63e3e1 (patch)
treed94c825bd63144a1a16129fe490b7154688b03f8 /examples
parentbe2d18b332eb74b6529e18a8f10abf71fcd7382a (diff)
downloadivy-java-c3ef99ea8cf40c894b42fc1cb6f88c627b63e3e1.zip
ivy-java-c3ef99ea8cf40c894b42fc1cb6f88c627b63e3e1.tar.gz
ivy-java-c3ef99ea8cf40c894b42fc1cb6f88c627b63e3e1.tar.bz2
ivy-java-c3ef99ea8cf40c894b42fc1cb6f88c627b63e3e1.tar.xz
Minor corrections.
Diffstat (limited to 'examples')
-rw-r--r--examples/Makefile2
-rw-r--r--examples/TestIvySwing.java17
2 files changed, 7 insertions, 12 deletions
diff --git a/examples/Makefile b/examples/Makefile
index c9e6206..2deae23 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -4,7 +4,7 @@ JAVACOPTS = -deprecation
.SUFFIXES: .java .class
SRCS = TestIvy.java TestIvySwing.java Counter.java ivyTranslater.java
OBJS = $(SRCS:.java=.class)
- JAVAC = jikes
+ JAVAC = jikes -classpath $(JIKESPATH) -d .
#JAVAC = javac
.java.class:
diff --git a/examples/TestIvySwing.java b/examples/TestIvySwing.java
index 1d5a25a..ddc199d 100644
--- a/examples/TestIvySwing.java
+++ b/examples/TestIvySwing.java
@@ -53,6 +53,8 @@ class TestIvySwing extends JPanel implements IvyApplicationListener {
domainList.add(startDomainList[i]);
}
+ Ivy getBus() { return bus; }
+
public static void main(String[] args) throws IvyException {
String domain="127.255.255.255:2010";
Getopt opt = new Getopt("Counter",args,"b:dhq");
@@ -146,16 +148,10 @@ class TestIvySwing extends JPanel implements IvyApplicationListener {
private class ComboCB implements ActionListener {
public void actionPerformed(ActionEvent e) {
String newDomain=(String)ports.getSelectedItem();
- if (newDomain == domain) {
- // if it's the same domain, don't do anything
- return;
- }
+ // if it's the same domain, don't do anything
+ if (newDomain == domain) { return; }
domain=newDomain;
- try {
- append( "deconnexion from domain "+ bus.getDomain(null));
- } catch ( IvyException ie ) {
- System.err.println("deconnexion failed");
- }
+ append( "deconnexion from domain "+ bus.getDomain(null));
bus.stop();
try {
bus.start(newDomain);
@@ -221,8 +217,7 @@ class TestIvySwing extends JPanel implements IvyApplicationListener {
System.out.println("closing");
bus.stop();
f.dispose();
- // I leave when the last TestIvySwing exits
- if (--nbTIS == 0) System.exit(0);
+ if (--nbTIS == 0) System.exit(0); // I leave when the last TestIvySwing exits
System.out.println("closed");
}
public void windowActivated(WindowEvent e) {tfSend.grabFocus();}