Answers for "Mouse_Event.java:7: error: cannot access JFrame static JFrame frame; ^ bad source file: .\JFrame.java file does not contain class JFrame Please remove or make sure it appears in the correct subdirectory of the sourcepath. 1 error"

8

java create jframe

import javax.swing.JFrame;

public class example {
  public static void main(String[] args){
    JFrame frame = new JFrame();
    frame.setSize(100,100);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOES);
    frame.setTitle("Example Frame");
    frame.setVisible(true);
  }
}
Posted by: Guest on April-17-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language