java - Undefined Type for JFrame -
so getting error in eclipse java program make new jframe , couldnt quiet figure out wouldnt load correct data set visable , set title, location, size, , should when closes jframe id if please
import javax.swing.*; import java.awt.*; public class jframe { public static void main(string[] args) { jframe jf = new jframe(); jf.settitle("test"); jf.setsize(400, 200); jf.setlocation(200, 300); jf.setdefaultcloseoperation(javax.swing.jframe.exit_on_close); jf.setvisible(true); } }
thanks in advance
you named own class jframe
, hiding standard javax.swing.jframe
class.
choose name class.
Comments
Post a Comment