java - How do you add a jFrame to your main class in Netbeans? -
so have made jframe lot of elements , buttons , things in it, new using netbeans. upon creating java application main class.java created , upon adding jframe jframe.java created. how main class open, read, , run jframe.java? can upload specific code if need be.
thanks in advance
to call method class, must first create new object class, this:
jframe frame = new jframe(); frame.setvisible(true); //or whatever method in jframe.class
maybe rename actual class name jframe frameone. i've heard naming classes same classes in java api cause trouble.
or, put in 1 class, either 2 separate methods or put in main method. if doesn't help, please paste exact code on pastebin.org , give link.
Comments
Post a Comment