• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Head first Java (The Book)

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well i got this book since a few days as i wanted to learn java, reading through first sides... oh snap first programm

sooo after alot of using the javac command finally the code looks like this:


the book shows you a window should pop up but it doesnt pop up
Im useing JDK1.7 and Windows7
 
Ranch Hand
Posts: 88
Netbeans IDE Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That code is incomplete. hehe
 
Kevin Kroll
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
well ive no idea whats missing, you could tell me that as im a beginner and ive no idea why this doesnt work
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you need to set the frame visible
you'll also need a window listener to close the frame/program
and you also need to do a lot more add(..)ing

 
Mack Wilmot
Ranch Hand
Posts: 88
Netbeans IDE Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Kevin Kroll wrote:well ive no idea whats missing, you could tell me that as im a beginner and ive no idea why this doesnt work



That is just some snippet of code at the front of the book, it's not supposed to be complete. Forget that code and move on. You are not supposed to understand AWT until you get to that section of the book.
 
Ranch Hand
Posts: 1164
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Concentrate on grasping the concept that the authors are trying to put through. Leave the specific packages / classes / APIs for later. Those are for later. For now, make sure you understand the following through and through(in order):

a) Declarations, Access Control

b) Object oriented paradigm (what is encapsulation of data, abstraction, inheritance etc )

c) Flow Control(for loop, do while loop)

d) Exception handling in Java

e) Method overloading & overriding.

f) String & Object classes

g) Collection Framework



 
Marshal
Posts: 75842
361
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

Lots of people ask this question and get confused about the Party class.
Ignore the Party example. It is incomplete. It is simply there to show you what a class looks like. Keep going with the rest of the book.
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic