I made a WindowBuilder class on Eclipse, but when I try run that class, it say that I need to put a "public static void main(String[] args){}", ok, I put it into the class, and some elements are incompatibles with the "public static void..." | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I made a WindowBuilder class on Eclipse, but when I try run that class, it say that I need to put a "public static void main(String[] args){}", ok, I put it into the class, and some elements are incompatibles with the "public static void..."

23rd Jul 2016, 2:30 PM
Estêvão Rolim
Estêvão Rolim - avatar
2 Answers
+ 2
You'll need to show your code so we can see what you did wrong. When you create a program, it starts with the main method, that's what gets run first and has to be there to work. If you built a program without it, it's likely a few method calls/variables need to be moved inside of it. Will know more when I can see your code.
23rd Jul 2016, 3:13 PM
James
James - avatar
0
Alternatively you could make another class with a main method and create an object of that window builder class.
24th Jul 2016, 6:41 AM
Gershon Fosu
Gershon Fosu - avatar