O'Reilly logo

Microsoft® Visual J#™ .NET (Core Reference) by John/Longshaw, Andy Sharp

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Porting Existing Java Applications

If you’ve spent time writing an application in Java, the last thing you want to do is to rewrite it using the .NET classes. In this section, we’ll look at how you can compile and run an AWT application under .NET. The code we’ll use is for a simple text editor. In this section, the code will use the AWT libraries.

The code for the application follows, in the class EditorFrame. We won’t walk you through how the AWT works (this is a book about .NET, after all), but to summarize, the EditorFrame constructor calls the initComponents method, which creates new instances of all the components used within the application. The bulk of this method builds the menu structure for the application. For each menu item instance, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required