Bug 1378 : Panels get pushed to the background in OpenGL mode
Last modified: 2009-11-28 12:54




Status:
RESOLVED
Resolution:
INVALID -
Priority:
P2
Severity:
normal

 

Reporter:
jeffg
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2009-11-28 12:52
Processing 1.0.9
MacOS X 10.6.2

This works if you take it out of OpenGL mode. I need it to work in OpenGL
mode, but it gets pushed behind the OpenGL canvas.

import processing.opengl.*;
void setup() {
size(300,200,OPENGL);
makeUI();
}

void draw() {
background(0);
}

void makeUI() {
setLayout(null);//lets us specify where to put objects
Panel p = new Panel();
p.setBounds(width/2-50,height/2-50,100,100);
p.setBackground(new Color(255,255,255));
add(p);
}
Additional Comment #1 From fry 2009-11-28 12:54
You cannot use AWT panels: http://processing.org/faq.html#java