JDK-4407186 : Enabling a JFrame causes complete repaint/flash using Windows
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.3.0
  • Priority: P1
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_nt
  • CPU: x86
  • Submitted: 2001-01-23
  • Updated: 2001-02-01
  • Resolved: 2001-02-01
Related Reports
Duplicate :  
Description

Name: boT120536			Date: 01/23/2001


# not available

We are implementing a client/server application for Windows & OS/2, where the
client side is written in Java. When the user requests data from the server, the
frame is disabled. When enabling the JFrame, it repaints itself completely when
run under Windows (this is not happening in OS/2). In some cases a selection in
a JList causes a call to the server (with a very fast answer). To demonstrate
the effect, here is a small example program (use the cursor keys to navigate
through the list):

import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;


public class TestFrame extends JFrame implements ListSelectionListener
{
    private JList list;
    private JLabel label1;

    public TestFrame()
    {
    super();

    Object[] inhalt = {"Eintrag", "Diverses", "Produkt",
"Testfall","Sonstiges","Eintrag",
                       "Diverses", "Produkt",
"Testfall","Sonstiges","Eintrag", "Diverses",
                       "Produkt", "Testfall","Sonstiges"};

    this.list = new JList(inhalt);
    this.label1 = new JLabel("Input:");
    this.getContentPane().setLayout(new GridLayout(0,2));
    this.getContentPane().add(label1);
    this.getContentPane().add(list);

    this.list.addListSelectionListener(this);

    this.setSize(150,400);
    this.show();
    }

    public void valueChanged(ListSelectionEvent e)
    {
    this.setEnabled(false);
    this.setEnabled(true);
    }


    public static void main(String[] args)
    {
        TestFrame frame = new TestFrame();
    }
}
(Review ID: 115621) 
======================================================================

Comments
EVALUATION JFrame doesn't override setEnabled (or enable, disable) so that this behavior is likely happening in awt. scott.violet@eng 2001-01-30 Just a wild guess - related to 4295524? eric.hawkes@eng 2001-01-30 Commit to Merlin richard.ray@eng 2001-01-31 Duplicate of 4096745 richard.ray@eng 2001-01-31
30-01-2001