Reputation: 8526
From what I know and have been reading, converting from awt to swing seems to be quite mechanical. With the exception of the different threading model, most of swing components generally map well with the awt ones.
Was looking for a tool to do this conversion automatically. Understandably, this may not be a 100% conversion, but at least the mechanical process should be fairly automated. Would any one know of a such a tool ?
Upvotes: 4
Views: 1675
Reputation: 168825
Why a script changing AWT to Swing component names will not be sufficient.
TextArea
(built-in) & Swing JTextArea
(wrapped in a JScrollPane
)JTextArea(String,int,int,int)
Canvas
.CheckBox
might be translated to a JCheckBox
, but a CheckBox
in a CheckBoxGroup
should be converted to a JRadioButton
in a ButtonGroup
.Advantages of Swing it will miss.
JFrame
has a defaultCloseOperation(int)
, which can (often) replace the AWT WindowListener
.Upvotes: 3
Reputation: 4556
there is a good article http://java.sys-con.com/node/36335
by reading this article it should be fairly easy to build this awt to swing tool yourself. you could write a search/replace script to change the names of the AWT components to the corresponding Swing ones.
Upvotes: 0