It's not a secret anymore!*
The moose likes Java in General and the fly likes why this error dialog comes(everybody please see once) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "why this error dialog comes(everybody please see once)" Watch "why this error dialog comes(everybody please see once)" New topic

why this error dialog comes(everybody please see once)

Dinesh Jayaraj

Joined: Nov 19, 2000
Posts: 23
hello everybody:
here is a simple program i have written to create a frme. this pgm compiles successfully without any errors
but when i run the pgm(using command:java filename)it gives the error dialog given below
this program has performed an illegal operation and will be
if the problem persists, contact the program vendor.
but when the same program run on the other system
where same jdk1.3 has been installed it runs nicely without
giving any dialog like this.
due to this problem iam not able to create any frame or
applet,and swing programs on my systems please
anybody find out the problem and tell the solution.
thanks in advance

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class FrameDemo {
public static void main(String s[]) {
JFrame frame = new JFrame("FrameDemo");
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
JLabel emptyLabel = new JLabel("");
emptyLabel.setPreferredSize(new Dimension(175, 100));
frame.getContentPane().add(emptyLabel, BorderLayout.CENTER);
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
Which "system" did it run on and which did it err on?? Also what browser were you using.

"JavaRanch, where the deer and the Certified play" - David O'Meara
I agree. Here's the link:
subject: why this error dialog comes(everybody please see once)
Similar Threads
JFrame Title not displayed (hp unix)
Doubt in this Swing program. can anyone clear my doubt?
whts wrong with this code.
plese help urgently(why this error dialog comes?)
why use static method in creating gui