• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

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: 22644
123
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: 75617
354
  • 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: 75617
354
  • 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.
 
Shiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic