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

Just learning SWING and came accross a code example that I modified as below.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 1.2.1
    • vm-legacy



      Name: skT88420 Date: 04/26/99


      JAVA CODE:
         import java.awt.*;
         import java.awt.event.*;
         import javax.swing.*;

         public class Demo {
            static JFrame jframe = new JFrame("Example");

            public static void setupJFrame () {
               try {
                   UIManager.setLookAndFeel("javax.swing.plaf.multi.MultiLookAndFeel");
                   SwingUtilities.updateComponentTreeUI(jframe);
               } catch (Exception exc) {
                   System.out.println("Unable to set System look and feel.");
                   System.exit(0);
               }


               jframe.setSize(400, 100);
               jframe.setVisible(true);
               jframe.getContentPane().setLayout( new FlowLayout() );

              // This handles closing of the window.
               WindowListener l = new WindowAdapter() {
                     public void windowClosing(WindowEvent e) {
                        System.exit(0);
                     }
               };
               jframe.addWindowListener(l);
            }

            public static void main(String[] args) {
               setupJFrame();
               JButton jb = new JButton("pressure");
               jb.setToolTipText("Can you handle it?");
               jframe.getContentPane().add( jb );
               jframe.pack();

               jb.addActionListener(
                   new ActionListener() {
                   int i = 1;
                   public void actionPerformed(ActionEvent e) {
                       System.out.println("pressed "+ i++);
                   }
               } );
            }
         }


      ERROR MESSAGE:
      A nonfatal internal JIT (3.00.078(x)) error 'Structured Exception(c0000005)' has
       occurred in :
        'sun/io/CharToByteConverter.convertAny ([CII[BII)I': Interpreting method.
        Please report this error in detail to http://java.sun.com/cgi-bin/bugreport.cg
      i

      A nonfatal internal JIT (3.00.078(x)) error 'Structured Exception(c0000005)' has
       occurred in :
        'sun/io/CharToByteSingleByte.convert ([CII[BII)I': Interpreting method.
        Please report this error in detail to http://java.sun.com/cgi-bin/bugreport.cg
      i


      JAVA -VERSION OUTPUT:
      java version "1.2"
      Classic VM (build JDK-1.2-V, native threads)

      JAVA -FULLVERSION OUTPUT:
      JAVA.EXE full version "JDK-1.2-V"
      (Review ID: 57474)
      ======================================================================

            Unassigned Unassigned
            skonchad Sandeep Konchady
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: