Or alternately, is there any way to modify the display area without modifying the JME source code?
I want to be able to include the Lobo browser alongside the game window. I had code that did this in a test application that called JOGL directly, but now I’d like to be able to do it alongside JME.
This is what the code in the test app looks like:
mainWindow = new Frame("Sage Games");
mainWindow.setSize(640, 480);
mainWindow.setMinimumSize(new Dimension(640, 480));
mainWindow.setBackground(Color.BLACK);
SpringLayout sl = new SpringLayout();
mainWindow.setLayout(sl);
glPanel = new GLCanvas();
glPanel.addGLEventListener(sg);
final Animator animator = new Animator(glPanel);
mainWindow.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
// Run this on another thread than the AWT event queue to
// make sure the call to Animator.stop() completes before
// exiting
new Thread(new Runnable() {
public void run() {
animator.stop();
System.exit(0);
}
}).start();
}
});
mainWindow.add(glPanel);
sl.putConstraint(
SpringLayout.WEST, glPanel, 0,
SpringLayout.WEST, mainWindow
);
sl.putConstraint(
SpringLayout.NORTH, glPanel, 0,
SpringLayout.NORTH, mainWindow
);
sl.putConstraint(
SpringLayout.SOUTH, glPanel, 0,
SpringLayout.SOUTH, mainWindow
);
if (LOAD_LOBO) {
try {
PlatformInit.getInstance().initLogging(false);
PlatformInit.getInstance().init(false, false);
loboPanel = new FramePanel();
}
catch (Exception e) {
loboPanel = null;
}
}
if (loboPanel != null) {
mainWindow.add(loboPanel);
sl.putConstraint(
SpringLayout.WEST, loboPanel, -200,
SpringLayout.EAST, mainWindow
);
sl.putConstraint(
SpringLayout.EAST, loboPanel, 0,
SpringLayout.EAST, mainWindow
);
sl.putConstraint(
SpringLayout.NORTH, loboPanel, 0,
SpringLayout.NORTH, mainWindow
);
sl.putConstraint(
SpringLayout.SOUTH, loboPanel, 0,
SpringLayout.SOUTH, mainWindow
);
try {
loboPanel.navigate("http://www.google.com/");
}
catch (Exception e) {
}
sl.putConstraint(
SpringLayout.EAST, glPanel, -2,
SpringLayout.WEST, loboPanel
);
}
else {
sl.putConstraint(
SpringLayout.EAST, glPanel, 0,
SpringLayout.EAST, mainWindow
);
}
mainWindow.setVisible(true);
animator.start();