• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

puzzled over java

 
joe tran
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am rather new to java so I'm a little confused about a discovery I just made. I just bought a "java class library" reference book. And the code sample in there shows a code somthing like this:

public class main extends Frame{......

Well, all this time that I was learning java I noticed that almost all java classes start with a "J", in this case it would be "JFrame". But it's not. What exactly am I missing? Thanks to anyone with some hint to enlighten me.

Joe
 
Jeremy Wilson
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Frame starts in AWT which was the windows graphics libraries prior to the Swing lib. All swing objects start with J and normally extend the same awt class name without the J. The only time you would need the awt (non J components) is when building web applets that is used in browsers that do not have a java plugin that will support swing. I would recommend to just stick with the J classes if you are unfamiliar. Basically just remember J is for swing, no J is AWT
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic