• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Ultra noob problem

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

http://img251.imageshack.us/my.php?image=1sk9.jpg
[ July 24, 2006: Message edited by: Keenan Staffieri ]
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
...read 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 :-)
 
Keenan Staffieri
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

CODE:


 
Ranch Hand
Posts: 490
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Keenan Staffieri
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic