hi everybody:
I am developing a JOGL application, mixing 2D & 3D using the GLJPanel component to render. For the project requirement, the application need to create a lots of instance of GLJPanel. And this GLJPanel object is actually rewrite by myselft, such following code:
class MyPanel extends GLJPanel
{
public MyPanel() {
}
public void paintComponenet(Graphics g) {
super.paintComponent(g);
// do some special
}
}
Because I need to render special 2D things. the problem is when I invoke "new MyPanel()"many times later, there will throw a “java.lang.OutOfMemory” error. Does someone known this issue? Thanks!