Skip to Content.
Sympa Menu

ndt-users - [liu@sfu.ca: NDT java error]

Subject: ndt-users list created

List archive

[: NDT java error]


Chronological Thread 
  • From: Peter Van Epp <>
  • To:
  • Subject: [: NDT java error]
  • Date: Wed, 23 Aug 2006 13:01:14 -0700

On the Mac with OS 10.3 and Java 1.4.2_09 Lixin had to make the
following changes to the Java code because it throws a security exception
unless you do (Internet Exploder on a PC workes fine though). The more
Java literate among us think this is a change to the language somewhere along
the line.

# diff -u Tcpbw100.java.orig Tcpbw100.java
--- Tcpbw100.java.orig 2006-08-18 02:50:49.000000000 -0700
+++ Tcpbw100.java 2006-08-23 11:17:00.000000000 -0700
@@ -171,7 +171,7 @@
}

public void init() {
- setLayout(new BorderLayout());
+ getContentPane().setLayout(new BorderLayout());
showStatus("Tcpbw100 ready");
failed = false ;
Randomize = false;
@@ -179,7 +179,7 @@
results = new MyTextPane();
results.append("TCP/Web100 Network Diagnostic Tool v" + VERSION + "\n");
results.setEditable(false);
- add(new JScrollPane(results));
+ getContentPane().add(new JScrollPane(results));
results.append("click START to begin\n");
Panel mPanel = new Panel();
startTest = new JButton("START");
@@ -208,7 +208,7 @@

});
mPanel.add(options);
- add(BorderLayout.SOUTH, mPanel);
+ getContentPane().add(BorderLayout.SOUTH, mPanel);
}

class MyTextPane extends JTextPane
@@ -1882,7 +1882,7 @@
}
f.setTitle("Web100 Variables");
Panel buttons = new Panel();
- f.add("South", buttons);
+ f.getContentPane().add("South", buttons);

disMiss = new JButton("Close");
disMiss.addActionListener(this);
@@ -1897,7 +1897,7 @@

buttons.add("West", disMiss);
buttons.add("East", copy);
- f.add(new JScrollPane(diagnosis));
+ f.getContentPane().add(new JScrollPane(diagnosis));
f.pack();
} // diagnose()

@@ -1911,7 +1911,7 @@
}
ff.setTitle("Detailed Statistics");
Panel buttons = new Panel();
- ff.add("South", buttons);
+ ff.getContentPane().add("South", buttons);

disMiss2 = new JButton("Close");
disMiss2.addActionListener(this);
@@ -1926,7 +1926,7 @@

buttons.add("West", disMiss2);
buttons.add("East", copy2);
- ff.add(new JScrollPane(statistics));
+ ff.getContentPane().add(new JScrollPane(statistics));
ff.pack();
} // statistics()

@@ -1943,10 +1943,10 @@
defaultTest.setSelected(true);
defaultTest.setEnabled(false);
testsPanel.add(defaultTest);
- optionsFrame.add(testsPanel);
+ optionsFrame.getContentPane().add(testsPanel);

Panel buttons = new Panel();
- optionsFrame.add("South", buttons);
+ optionsFrame.getContentPane().add("South", buttons);

JButton okButton= new JButton("OK");
okButton.addActionListener(new ActionListener() {

----- End forwarded message -----

Peter Van Epp / Operations and Technical Support
Simon Fraser University, Burnaby, B.C. Canada



Archive powered by MHonArc 2.6.16.

Top of Page