hello,

just noticed a thing:
i began to implement a proggie on my laptop (jdk1.1.5, swing 1.0.2) and now
wanted to continue on my normal host, but at the first attempt my prog crashed
the 1.1.6v2 vm.....

the inflicting part seems to be:
import java.awt.*;
import java.awt.event.*;


public class Bummer extends Dialog implements ActionListener

{
        TextArea message;
        Button ok;
 
 
 Bummer(Frame caller, String affiche)
 {
  super(caller,"Bummer",false);
  
        message = new TextArea(affiche);
        message.setBackground( Color.yellow);
        //ok.setBackground( Color.yellow);
        //message.setForeground( Color.green);
        message.setEditable( false );
  
        ok = new Button("Ok");
        ok.addActionListener(this);
  
        add("Center",message);
  add("South",ok);
  
        pack();
  
  
 }
 Bummer(Frame caller, String affiche, Color fore, Color back)
 {
  super(caller,"Bummer",false);
  
        message = new TextArea(affiche);
        message.setBackground( back);
        //ok.setBackground( back);
        message.setForeground( fore);
        //ok.setForeground( fore);
        message.setEditable( false );
  
        ok = new Button("Ok");
        add("Center",message);
  add("South",ok);
  
        pack();
  
  
 }
 
 
public void actionPerformed(ActionEvent e)
 {
  Object surQuoi = e.getSource();
  if (surQuoi == ok)
  {
                dispose();
  }
  
 }
 
}

since when i click on the ok button, all crashes and form the log i see:
Exception occurred during event dispatching:
com.sun.java.swing.text.StateInvariantError: infinite loop in formatting
        at
com.sun.java.swing.text.ParagraphView.rebuildRows(ParagraphView.java:
172)
        at com.sun.java.swing.text.ParagraphView.layout(ParagraphView.java:128)
        at com.sun.java.swing.text.BoxView.setSize(BoxView.java:129)
        at com.sun.java.swing.text.BoxView.layout(BoxView.java:563)

coming from the JComponent.paint method......
so is it my code? a problem with my vm? (jdk1.1.6v2-glibc), maybe a known
problem with jdk1.1.6?

any hint welcome.... meanwhile i go back to my laptop :(
 
ciao
bboett
==============================================================
acount at earthling net 
http://erm6.u-strasbg.fr/~bboett
===============================================================
Unsolicited commercial email is NOT welcome at this email address
To contact me replace acount by bboett in above addresses

Reply via email to