Ok.. I'm at the point of begging
please please please someone help me with this. I've spent over a week trying to figure it out and I just lack the skill. I do recontribute to the community and the forum.
Ultimately, I'm trying to embed a web browser component (like lobo, jdic, DJNativeSwing) into a processing sketch, but I need it to work in OpenGL and FullScreen Exclusive Mode. I don't think the issue is with the web browser component, I've got these working fine using examples on this forum.
Here is the issue: I can embed the browser component into a frame or panel, but I can't get the panel to display in OpenGL. I can't get a frame to punch through exclusive fullscreen mode. However I try, I can't find a way to make the browser visible. It gets pushed to the background, even when calling toFront() and other such foucs commands. I prefer the panel (or something similar) to be embedded in the sketch but a separate frame that is visible would also work.
Here is an example that works fine, but add size(640,480,OPENGL) and the panel/buttons disappear. Place it in presentation mode (fullscreen exclusive) and the panel/buttons disappear.
Code:import javax.swing.JButton;
import processing.opengl.*;
void setup() {
size(640,480);
makeUI();
}
void draw() {
background(0);
rect(300,200,20,20);
}
void makeUI() {
setLayout(null);//lets us specify where to put objects
Panel p = new Panel();
p.setBounds(0,0,width,50);
p.setBackground(new Color(255,0,0));
JButton jb = new JButton("Green");
jb.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {//button code
fill(0,255,0);
}
});
JButton jbr = new JButton("Red");
jbr.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {//button code
fill(255,0,0);
}
});
p.add(jb);
p.add(jbr);
add(p);
}
The Swing buttons themselves may be a lightweight/heavyweight issue, but the panel I believe is AWT which should be heavyweight. (Note the buttons are just an example and will not be in my sketch). HELP! Make this panel (or some variation) visible so I can embed a browser component into processing.
I really need to make this happen and would be extremely grateful for the assistance.