Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

More SIGBUS when dragging JFrames



I've done a bit more investigation and it appears that making a JFrame
resizable has something to do with the SIGBUS errors. The following test
case will fail.

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

public class JFrameTest extends JFrame {
public JLabel mImageLabel;
public Container mContentPane;
public ImageIcon mIcon;

public static void main(String args[]) {
new JFrameTest();
}

public JFrameTest() {
super("JFrame Drag");
mContentPane = getContentPane();
mIcon = new ImageIcon("insertJPEGofchoice.jpg");
mImageLabel = new JLabel(mIcon);
mImageLabel.setBorder(BorderFactory.createEtchedBorder());
mImageLabel.setText("The Text Goes Here");
mContentPane.add(mImageLabel);
pack();
setResizable(false);
setVisible(true);
}
}


If the statement "mImageLabel.setText("The Text Goes Here");" is
removed everything is fine. If I leave the setText call and instead
change "setResizable(false);" to "setResizable(true);" all is well.
Would someone be willing to try this and let me know the results? I feel
like I've entered the Twilight Zone.

--
Bob




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.