Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4406061

jdk1.4 Swing application which used to work for jdk1.3 hung up CDE

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.4.0
    • 1.4.0
    • client-libs
    • None
    • 2d
    • beta
    • sparc
    • solaris_8

      The following simple demo program which used to work fine for jdk1.3 hung up
      my machine completely. The panic reset Stop-A would not bring the machine
      to reboot at all. The only way to reboot is power cycle.

      The gif file that's require to run the demo is with the X Attachments.

      My frame buffer is Raptor GFX also known as PGX32, PN 370-3753
      I have tried with a different PGX32 graphic card and the same thing happened.
      So that ruled out bad hardware.

      This same program ran OK for someone who has a 3D Creator frame buffer.

      I believe I have all the latest patches required to run JDK1.4.
      ----------------------------------------------------------------------------
      import java.awt.*;
      import java.awt.event.*;
      import javax.swing.*;
      import javax.swing.event.*;

      public class rButton extends JFrame {

          rButton() {
              Container c = getContentPane();
              c.setLayout(new FlowLayout());

              JPanel p1 = new JPanel();
              JPanel p2 = new JPanel();
              p1.setLayout(new BoxLayout(p1, BoxLayout.X_AXIS));
              p2.setLayout(new BoxLayout(p2, BoxLayout.Y_AXIS));
              c.add(p1);
              c.add(p2);

              ImageIcon icon = new ImageIcon("./red-ball.gif");

              JRadioButton []rb1 = {
                  new JRadioButton("Insets = 40", icon),
                  new JRadioButton("Insets = 30"),
                  new JRadioButton("Insets = 20"),
                  new JRadioButton("Insets = 10")
              };

              JCheckBox cb1 = new JCheckBox("Insets = 15", icon);
              JCheckBox cb2 = new JCheckBox("Insets = 15", icon);
              cb1.setMargin(new Insets(15, 15, 15, 15));
              cb2.setMargin(new Insets(15, 15, 15, 15));

              rb1[0].setMargin(new Insets(10, 10, 10, 10));
              rb1[1].setMargin(new Insets(20, 20, 20, 20));
              rb1[2].setMargin(new Insets(30, 30, 30, 30));
              rb1[3].setMargin(new Insets(40, 40, 40, 40));

              JRadioButton []rb2 = {
                  new JRadioButton("Insets = 40", icon),
                  new JRadioButton("Insets = 30"),
                  new JRadioButton("Insets = 20"),
                  new JRadioButton("Insets = 10")
              };

              rb2[0].setMargin(new Insets(10, 10, 10, 10));
              rb2[1].setMargin(new Insets(20, 20, 20, 20));
              rb2[2].setMargin(new Insets(30, 30, 30, 30));
              rb2[3].setMargin(new Insets(40, 40, 40, 40));

              for (int i = 0; i < 4; i++) {
                  p1.add(rb1[i]);
                  p2.add(rb2[i]);
              }

              p1.add(cb1);
              p2.add(cb2);

              p1.validate();
              p2.validate();

              pack();
              setSize(800, 400);
              setVisible(true);
              addWindowListener(new WindowAdapter() {
                  public void windowClosing(WindowEvent we) {
                      System.exit(0);
                  }
              });
          }

         public static void main(String argv[]) {
              new rButton();
          }
      }

            tdv Dmitri Trembovetski (Inactive)
            rphamsunw Roger Pham (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: