Nope, same result.
In case it will help, here’s the code for UI.java:
//---------------------------------------------
// UI
//---------------------------------------------
// Last modified: May 4 2006
//
// This class defines the user interface
//---------------------------------------------
package lupine;
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import java.net.*;
import javax.swing.*;
import javax.swing.text.html.*;
import java.lang.Math.*;
import java.beans.*;
import java.text.*;
import javax.swing.*;
import javax.swing.text.*;
import javax.swing.text.html.*;
public class UI {
private static Scene scene = Scene.getInstance();
private static Render render = Render.getInstance();
private static int htmlSize;
//The format of prices in the program
private static final DecimalFormat currencyFormat = new DecimalFormat("###,###,###,###.00");
public static JPanel frame = new JPanel();
public static Checkbox walk, fly;
public static ImageButton keyA, keyZ, title;
public static JEditorPane htmlPane;
//Specify the html escape and regex code for the currency symbol (in this case the euro)
public static final String currencyHtml = "€";
public static final String currencyJava = "\u20AC";
//Hardcoded html strings
public static final String loadScreen = "<html><head><style><!-- body { margin-top: 0px; background: #FFFFFF; } " +
"h1 { color: black; font-family: Arial, Helvetica; font-size: 20pt; }--></style></head><body>" +
"
<table width='100%'><tr><td align='center'>" +
"<h1>De maquette wordt geladen.
Een ogenblik geduld a.u.b.</h1></td></tr></table></body></html>";
public static final String priceString = "Totale prijs tot nu toe: ";
public static final String titleStart = "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"><tr><td><h1>";
public static final String titleEnd = "</h1></td><td align=\"right\" valign=\"top\"><a href=\"../blank.html\">" +
"<img src=\"../close.gif\" border=\"0\"></a></td></tr></table>";
public static synchronized JPanel getPanel() {
//Load the user interface
loadGUI();
//Pack the JPanel
frame.validate();
//Maximize the html panel
UI.showHtml(2);
return frame;
}
//Return the state of the html pane
//0 = hidden, 1 = normal, 2 = maximized
public static synchronized int getHtmlSize() {
return htmlSize;
}
//Set the state of the html pane
public static synchronized void setHtmlSize(int size) {
htmlSize = size;
}
//Place GUI compments like menus and buttons on the supplied frame
private static void loadGUI() {
final Color background = new Color(255, 255, 255);
URL imgURL;
//Show tooltips after 10 ms instead of the default 750 ms
ToolTipManager.sharedInstance().setInitialDelay(10);
//Set the frame colors
frame.setBackground(background);
frame.setForeground(new java.awt.Color(0, 0, 0));
//Use a gridbag layoutmanager
frame.setLayout(new GridBagLayout());
GridBagConstraints c = new GridBagConstraints();
//Let components completely fill the cells
c.fill = GridBagConstraints.BOTH;
//Title panel
c.gridx = 0;
c.gridy = 0;
c.gridwidth = 2;
c.weightx = 0.0;
c.weighty = 0.0;
c.insets = new Insets(15, 50, 0, 50);
Panel titlePanel = new Panel();
frame.add(titlePanel, c);
//Add content to title panel
//Again, use a gridbag layoutmanager
titlePanel.setLayout(new GridBagLayout());
GridBagConstraints ct = new GridBagConstraints();
ct.anchor = GridBagConstraints.NORTHWEST;
ct.gridx = 0;
ct.gridy = 0;
imgURL = UI.class.getResource(Lupine.uiFilePath + "buttonhelp.gif");
ImageButton buttonHelp = new ImageButton(imgURL, imgURL, 0, Lupine.htmlFilePath + "help.html");
buttonHelp.setCursor(new Cursor(Cursor.HAND_CURSOR));
buttonHelp.setToolTipText("Help");
titlePanel.add(buttonHelp, ct);
ct.gridx = 1;
titlePanel.add(new Label(" "), ct);
ct.gridx = 2;
imgURL = UI.class.getResource(Lupine.uiFilePath + "buttoninfo.gif");
ImageButton buttonInfo = new ImageButton(imgURL, imgURL, 0, Lupine.htmlFilePath + "info.html");
buttonInfo.setCursor(new Cursor(Cursor.HAND_CURSOR));
buttonInfo.setToolTipText("Info");
titlePanel.add(buttonInfo, ct);
ct.gridx = 3;
titlePanel.add(new Label(" "), ct);
ct.gridx = 4;
imgURL = UI.class.getResource(Lupine.uiFilePath + "buttonadvanced.gif");
ImageButton buttonAdvanced = new ImageButton(imgURL, imgURL, 0, Lupine.htmlFilePath + "options.html");
buttonAdvanced.setCursor(new Cursor(Cursor.HAND_CURSOR));
buttonAdvanced.setToolTipText("Geavanceerde opties");
titlePanel.add(buttonAdvanced, ct);
ct.gridx = 5;
ct.weightx = 1.0;
titlePanel.add(new Label(" "), ct);
ct.gridx = 6;
ct.weightx = 0.0;
ct.gridheight = 2;
ct.anchor = GridBagConstraints.EAST;
imgURL = UI.class.getResource(Lupine.uiFilePath + "title.gif");
title = new ImageButton(imgURL, imgURL, 0, "");
titlePanel.add(title, ct);
ct.gridx = 0;
ct.gridy = 1;
ct.gridheight = 1;
ct.gridwidth = 5;
ct.anchor = GridBagConstraints.WEST;
imgURL = UI.class.getResource(Lupine.uiFilePath + "bbvh.gif");
ImageButton logo = new ImageButton(imgURL, imgURL, 0, "");
titlePanel.add(logo, ct);
//
//OpenGL Canvas
c.gridy = 1;
c.gridwidth = 1;
c.weightx = 1.0;
c.weighty = 1.0;
c.insets = new Insets(5, 50, 0, 0);
frame.add(Lupine.canvas, c);
//HTML Pane
c.gridx = 1;
c.weightx = 0.0;
c.weighty = 1.0;
c.insets = new Insets(5, 0, 0, 50);
c.anchor = GridBagConstraints.NORTHWEST;
htmlPane = new JEditorPane("text/html", "");
//Set the loading html page directly since loading it with setPage takes too long on old computers,
//which prevents it from getting displayed at all
UI.htmlPane.setText(loadScreen);
htmlPane.setBackground(background);
htmlPane.setBorder(BorderFactory.createEmptyBorder());
htmlPane.setEditable(false);
htmlPane.addHyperlinkListener(new MyHyperlinkListener());
//Html pages are loaded asynchronously. This code fires whenever a page is fully loaded
htmlPane.addPropertyChangeListener(new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent e) {
if(e.getPropertyName().equals("page")) {
//Apply post-processing to the page
processHtml();
}
}
});
frame.add(htmlPane, c);
//Flight panel
c.gridx = 0;
c.gridy = 2;
c.gridwidth = 2;
c.weightx = 0.0;
c.weighty = 0.0;
c.insets = new Insets(25, 50, 25, 50);
c.anchor = GridBagConstraints.CENTER;
Panel flightPanel = new Panel();
frame.add(flightPanel, c);
//Add content to flightpanel
...Snipped...
//
}
//Display a html page in the html pane
public static boolean loadHtml(String target) {
URL location = UI.class.getResource("/" + target);
//Determine if the frame should be hidden
if (target.equals("")) {
//Hide the html pane
showHtml(0);
location = UI.class.getResource("/" + Lupine.htmlFilePath + "blank.html");
} else {
//Show the html pane at regular size
showHtml(1);
}
//Try to display the page
try{
htmlPane.setPage(location);
} catch(Exception eu){
htmlPane.setText("Could not load page");
//Loading the page failed
return false;
}
//Loading the page succeeded
return true;
}
//Show or hide the HTML component
public static void showHtml(int size) {
int height = (int)Math.max(Lupine.canvas.getHeight(), UI.htmlPane.getSize().getHeight());
int fullWidth = (int)UI.frame.getSize().getWidth() - 100;
//Record which state the html pane is in
setHtmlSize(size);
//Hide it
if (size == 0) {
//Resize the viewport to the full screen width
Lupine.canvas.setSize(new Dimension(fullWidth, height));
UI.htmlPane.setPreferredSize(new Dimension(0, height));
}
//Show it at regular size
if (size == 1) {
//Resize the viewport to the full screen width
Lupine.canvas.setSize(new Dimension(fullWidth - (int)UI.title.getSize().getWidth() - 10, height));
UI.htmlPane.setPreferredSize(new Dimension((int)UI.title.getSize().getWidth() + 10, height));
}
//Show it maximized
if (size == 2) {
//Resize the viewport to the full screen width
Lupine.canvas.setSize(new Dimension(0, height));
UI.htmlPane.setPreferredSize(new Dimension(fullWidth, height));
}
//Pack the JPanel
UI.frame.validate();
//Set the focus to the canvas so there's no selection box around the first radio button
Lupine.canvas.requestFocusInWindow();
render.setWantRender(true);
}
}