File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Ultra noob problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Ultra noob problem" Watch "Ultra noob problem" New topic

Ultra noob problem

Keenan Staffieri

Joined: Jul 22, 2006
Posts: 23
Ok, I try to compile a JPanel App, and I get this error for some reason! I'm using java sdk 1.5, and runtime 1.5(the most uptodate one) and im getting this problem. My applet programs run fine, but I cant seem to get JPanel to work, thanx. And this should run, because JBuilder created this for me.
[ July 24, 2006: Message edited by: Keenan Staffieri ]
Giovanni De Stefano

Joined: Jul 18, 2006
Posts: 21 the messages area: "No such method found: main" basically you either didn't write a main or it cannot be found!

If you post your code qould be much easier to debug!

Gio :-)

SCJP 1.4
Keenan Staffieri

Joined: Jul 22, 2006
Posts: 23
Yes, I saw that before, and know that a program needs a main(String[] args) to run if its an app. Yet I find it strange that it would not be there, I thought JBuilder would auto-create this so I could run it immeditaly and an intro.


Rusty Shackleford
Ranch Hand

Joined: Jan 03, 2006
Posts: 490
Why would it auto-create a main method? Would the IDE know what should be in main? Add main, and call Panel test from there.

Also show() is deprecated and should never be used, use setVisible(true) instead.
[ July 24, 2006: Message edited by: Rusty Shackleford ]

"Computer science is no more about computers than astronomy is about telescopes" - Edsger Dijkstra
Keenan Staffieri

Joined: Jul 22, 2006
Posts: 23
eh, nvm.

The tutorials I am utilizing work anyway.

When I said JBuilder made this, I meant it in that, when you create a new file in JBuilder it has stuff already there for you to compile and see, as a sample, but i find it weird it has no main.
Joanne Neal

Joined: Aug 05, 2005
Posts: 3742
Did you check the Generate Main Method option in the JBuilder New Class Wizard ?
Not all classes require a main method, therefore JBuilder is not going to create one unless you tell it to.

I agree. Here's the link:
subject: Ultra noob problem
It's not a secret anymore!