Small conditional changes made in:
fatalError(String, Exception)
fatalError(String)
disconnect()
These additions avoid System.exit(int) calls when VncViewer is being run not as a separate frame.
This does not affect the default behavior of VncViewer as a stand-alone app or when embedded as an Applet. The modifications are designed to make VncViewer easier to embed in other Java projects.
Diff:
823a824
> rfbThread = null;
829c830,831
< } else {
---
> }
> else if (inSeparateFrame) {
831a834,836
> else {
> buttonPanel.disableButtonsOnDisconnect();
> }
845a851,852
> } else if (!inSeparateFrame) {
> showConnectionStatus(str);
867a875,876
> } else if (!inSeparateFrame) {
> showConnectionStatus(str);
VncViewer.java with changes
Please re-generate this diff using 'diff -Naur'
Also, what version does it apply against?
Nevermind ... sorry, didn't notice the attached file.