Java how to start up the GUI made with IntelliJ IDEA -
i have made simple gui using intellij-idea , can't figure out how start up. form1 f = new form();
inside main()
function doesn't seem anything. know how start ?
public class main { public static void main(string[] args) { system.out.println("hello world!"); form1 t = new form1(); } }
i had add couple of lines more expected. here how working code looks form1.java
file. didn't change main()
fucntion.
public class form1 extends jframe { // ******** these auto-generated ide ******** private jpanel panel1; private jbutton button1; private jbutton bb137; private jbutton button3; private jbutton button4; private jbutton button5; private jbutton button6; private jbutton button7; private jcheckbox checkbox1; private jradiobutton radiobutton1; private jradiobutton radiobutton2; private jradiobutton radiobutton3; // ************************************************************ public form1(){ super("whatever form title here."); // panel1 main panel can see in question's screenshot setcontentpane(panel1); //x , y, width, height setbounds(300,300,600,600); setdefaultcloseoperation(jframe.exit_on_close); setvisible(true); } }
Comments
Post a Comment