Skip to main content

Using AWT

1 reply [Last post]
blackmage
Offline
Joined: 2007-08-28
Points: 0

Should I refrain from using AWT all together in my development? Because I'm making a class that implements awt features that are not necessary gui's, but things like color and action event or screen position. Here are the awt imports from one class.

<br />
import java.awt.Color;<br />
import java.awt.Dimension;<br />
import java.awt.Font;<br />
import java.awt.Graphics;<br />
import java.awt.Image;<br />
import java.awt.MediaTracker;<br />
import java.awt.Rectangle;<br />
import java.awt.Toolkit;<br />
import java.awt.event.ActionEvent;<br />
import java.awt.event.KeyEvent;<br />
import java.awt.event.KeyListener;<br />

Is using any of these not recommended?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Bill Foote

No - all the low-level stuff in AWT is quite fundamental and
necessary.

I'm not comfortable with a blanket statement that says
that any part of the BD-J platform is "not recommended," by
the way. Now, there are parts of desktop JDK's AWT that
aren't /present/ in BD-J, like the high-level widgets
(java.awt.Button) - using them isn't really "not recommended,"
is more "totally futile," since all you'll get if you try is
a compilation error.

There are high-level widgets defined in org.havi that are a part
of BD-J. With these, I wouldn't say their use is "not recommended."
Their are issues around them, and they're certainly less central to
the kinds of entertainment-centric things you'd tend to want to do
on a disc - I wouldn't recommend using them for interesting animated
effects, but even with the HAVi widgets I wouldn't make a blanket
statement saying they're "not recommended."

Cheers,

Bill

bd-j-dev@mobileandembedded.org wrote:
> Should I refrain from using AWT all together in my development? Because I'm making a class that implements awt features that are not necessary gui's, but things like color and action event or screen position. Here are the awt imports from one class.
>
> [code]
> import java.awt.Color;
> import java.awt.Dimension;
> import java.awt.Font;
> import java.awt.Graphics;
> import java.awt.Image;
> import java.awt.MediaTracker;
> import java.awt.Rectangle;
> import java.awt.Toolkit;
> import java.awt.event.ActionEvent;
> import java.awt.event.KeyEvent;
> import java.awt.event.KeyListener;
> [/code]
>
> Is using any of these not recommended?
> [Message sent by forum member 'blackmage' (blackmage)]
>
> http://forums.java.net/jive/thread.jspa?messageID=248037
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
> For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net