This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes AWT, why abstract? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "AWT, why abstract?" Watch "AWT, why abstract?" New topic
Author

AWT, why abstract?

dipa doke
Greenhorn

Joined: Oct 05, 2006
Posts: 5
Hello all,

Can anyone tell me why Abstract Windowing Toolkit is called Abstract?
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15290
    
    6

Welcome to JavaRanch dipa.

We don't have too many rules around here but we do have a Naming Policy. Please adjust your display name accordingly. You can do so by clicking here.

Thanks a bunch.


GenRocket - Experts at Building Test Data
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15290
    
    6

I'm not real sure why. That's a good question. There don't appear to be a numerous amount of abstract classes in the java.awt package. My guess would be that when they were designing the toolkit, they used the word abstract to mean a generic toolkit that was probably intended to have something built on top of it. I don't think AWT's term abstract is meant to mean the same thing as an abstract class.

But that is just my opinion.
dipa doke
Greenhorn

Joined: Oct 05, 2006
Posts: 5
thanks a lot Gregg. Can anyone add to this? Please reply.
Jean S´┐Żbastien
Greenhorn

Joined: Oct 06, 2006
Posts: 4
I think it is called Abstract because it is an abstraction of the underlying system (windows, linux, mac os...) actually displaying the components.

When you use an AWT component, for example a Button, Java uses native libraries to display the button (think of something like "Windows.displayButton(myButton)" or "Linux.displayButton(myButton)").

The underlying system provides the "concrete" implementation for the "abstract" AWT component.


SCJP 1.4 (95%)<br />SCJD (working on)
dipa doke
Greenhorn

Joined: Oct 05, 2006
Posts: 5
Hey thanks, Jean. Thats a good one.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: AWT, why abstract?
 
Similar Threads
about Class AbstractCollection
Why awt is called Abstract
why HttpServlet is abstract?
New Java Language Features
HttpServlet class