• 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
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

Symbol Not Found - What am I Missing?

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to specify the.. frame.setDefaultCloseOperation and it keeps telling me that the symbol frame can't be found. I have tired importing every package I could think of to no avail.

 
Rancher
Posts: 600
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jason:

That error isn't telling you that you're not importing something, it's telling you that you haven't defined a symbol called 'frame'.

John.
 
Ranch Hand
Posts: 243
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please declare the variable in the main method.
 
Jason Bodary
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
... what is there to declare or define? All I am trying to do is dictate how the frames close.
thus.. This is exactly how the java tutorial says to do it.. yet for me it throws an error on frame.

 
Sheriff
Posts: 22772
130
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jason Bodary wrote:... what is there to declare or define? [...]


Where do you declare "frame"?
 
Marshal
Posts: 78664
374
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Commonest reason for a "cannot find symbol" error message is a Tiny Spelling misstake, which is different from a tiny spelling mistake. Java recognises spelling and Spelling as different words.
 
John de Michele
Rancher
Posts: 600
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jason:

Since you haven't declared a variable called 'frame' in your main() method, Java does not know what to do when you call frame.setDefaultCloseOperation(). You also are calling new FreelanceBillingUI() without assigning a name to it. Maybe this is where you were supposed to define 'frame'.

John.
 
Campbell Ritchie
Marshal
Posts: 78664
374
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The GUI builder in NetBeans is really nice. Until you try to understand the code and realise you have learned nothing about layouts. Don't use automatic GUI builders at the "beginning" stage.
 
What do you have in that there bucket? It wouldn't be a tiny ad by any chance ...
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic