Bug 204

Summary: JOGL flickers under Mustang build 70
Product: [JogAmp] Jogl Reporter: Sven Gothel <sgothel>
Component: coreAssignee: Sven Gothel <sgothel>
Status: VERIFIED INVALID    
Severity: normal    
Priority: P3    
Version: 1   
Hardware: All   
OS: all   
Type: DEFECT SCM Refs:
Workaround: ---

Description Sven Gothel 2010-03-24 07:48:28 CET


---- Reported by kitfox 2006-02-10 07:58:52 ----

I've just upgraded to Mustang build 70 from build 66.  The latest release gives
some bad flickering when mixing swing and GLCanvas.  In the below example, you
can see tis by pressing and holding the button along the bottom of the window,
or by right clicking in the GLCanvas are to bring up a popup menu.  For some
reason, the popup menu only flickers some of the time.


/*
 * TestFrame.java
 *
 * Created on February 1, 2006, 11:35 AM
 */

package com.pantometrics.display;

import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import net.java.games.jogl.Animator;
import net.java.games.jogl.GLCapabilities;
import net.java.games.jogl.GLDrawable;
import net.java.games.jogl.GLDrawableFactory;

/**
 *
 * @author  kitfox
 */
public class TestJOGLFrame extends javax.swing.JFrame
{
    private GLDrawable canvas;
    Animator animator;
   
    /** Creates new form TestFrame */
    public TestJOGLFrame()
    {
        canvas = GLDrawableFactory.getFactory().createGLJPanel(new
GLCapabilities());
       
        add((Component)canvas, BorderLayout.CENTER);
       
        animator = new Animator((GLDrawable)canvas);
        animator.start();

       
        getContentPane().add((Component)canvas, BorderLayout.CENTER);
       
        setSize(640, 480);
       
       
    }
   
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">          
              
    private void initComponents()
    {
        popup_main = new javax.swing.JPopupMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        jMenuItem2 = new javax.swing.JMenuItem();
        jButton1 = new javax.swing.JButton();

        popup_main.setLightWeightPopupEnabled(false);
        jMenuItem1.setText("Item");
        popup_main.add(jMenuItem1);

        jMenuItem2.setText("Item");
        popup_main.add(jMenuItem2);

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        jButton1.setText("jButton1");
        getContentPane().add(jButton1, java.awt.BorderLayout.SOUTH);

        pack();
    }// </editor-fold>                       
   
    /**
     * @param args the command line arguments
     */
    public static void main(String args[])
    {
        java.awt.EventQueue.invokeLater(new Runnable()
        {
            public void run()
            {
                new TestFrame().setVisible(true);
            }
        });
    }

    class Popup implements MouseListener
    {
        public void mouseClicked(MouseEvent e)
        {
        }

        public void mousePressed(MouseEvent e)
        {
            if (e.isPopupTrigger())
            {
                popup_main.show(e.getComponent(), e.getX(), e.getY());
            }
        }

        public void mouseReleased(MouseEvent e)
        {
            if (e.isPopupTrigger())
            {
                popup_main.show(e.getComponent(), e.getX(), e.getY());
            }
        }

        public void mouseEntered(MouseEvent e)
        {
        }

        public void mouseExited(MouseEvent e)
        {
        }
    }
   
    // Variables declaration - do not modify                     
    private javax.swing.JButton jButton1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JPopupMenu popup_main;
    // End of variables declaration                   
   
}



---- Additional Comments From kbr 2006-02-11 02:04:47 ----

As discussed on the JOGL forum at
http://www.javagaming.org/forums/index.php?topic=12415.0 this appears to have
been a bug in the test case.




--- Bug imported by sgothel@jausoft.com 2010-03-24 07:48 EDT  ---

This bug was previously known as _bug_ 204 at https://jogl.dev.java.net/bugs/show_bug.cgi?id=204