Re: [SLUG] A JAVA Question.

From: Stuart Leonard (suncds@earthlink.com)
Date: Wed Mar 26 2003 - 17:34:26 EST


Changing the components from AWT to Swing is almost painless. The code
will be much easier to maintain. The AWT implementation of visual component
objects has much to be desired.

The naming of most components from AWT to Swing usually includes inserting a
"J" at the beginning of the component name (i.e., "Frame" is now "JFrame"),
and the import statement for the Swing components will be
import.javax.swing.*

Swing components also inherit from Component class, so most underlying code
in regards to overidden methods need not be changed.

The java.awt.TextField used the TextListener interface to listen for changes
to text. The JTextField class uses a DocumentListener interface instead of
a TextListener, so that will have to be changed. The TextListener class is
not used with Swing's text components.

The Swing JList class is substantially different from the awt List class, so
changes will be necessary to convert to a JList.

I am sure that there are other changes, but these are the ones that
predominantly come to mind.

BTW, you may want to become a part of the TBJUG Java mailing list (you can
sign up for this at www.tbjug.org)

----- Original Message -----
From: <wchast@utilpart.com>
To: <slug@nks.net>
Sent: Wednesday, March 26, 2003 9:03 AM
Subject: [SLUG] A JAVA Question.

> A friend of mine is attempting to move a Java app which was written
> using Visual Cafe into swing. (for one so we can run it on LINUX) do
> any of you know if there is software to do the conversion or is it
> going to be a re-write?
>
> I know that this is sort of off topic, but we are trying to make
> it run on non M$ OS's and the VC stuff is tied to M$. By moving it
> to swing (I am only the messenger, I told him I would poke around
> for him, so I am not sure if my description is totally clear here)
> to swing I understand the code will be open and much easier to maintain
> and also he will have a multiplatform version.
>
>
> -----------------------------------------------------------------------
> Chuck Hast
> Telecomms Consultant, Utility Partners.
> WEB www.utilpart.com
> Office number: 813.282.8828 x 1175
> C-phone number: 813.765.6743
> E-mail: wchast@utilpart.com
> SMS < 150 characters: 8137656743@mobile.att.net
> ARS KP4DJT
>
> To paraphrase my flight instructor;
> "the only dumb question is the one you DID NOT ask resulting in my going
out
> and
> having to identify your bits and pieces in the midst of torn and twisted
> metal."
>
>
>
>
> *****************************************************************
> This e-mail and any files transmitted with it are confidential and are
> intended solely for the use of the individual or entity to whom it is
> addressed. If you have received this transmission in error, please notify
> the sender immediately and destroy any hard copies you may have printed
and
> remove all copies of the e-mail from your hard drive. Opinions,
conclusions
> and other information in this message that do not relate to the official
> business of Utility Partners, Inc shall be understood as neither given nor
> endorsed by it.
>
> Visit us on the web at http://www.utilpart.com
> *****************************************************************
>
>
>



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 17:15:16 EDT