lists.zerezo.com



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

***BOGO*** [Mingw-users] FW: gcj. JTextArea compile problem



This message has disappeared from the mingw-users list but remains a problem. Please help (i) advise any unacceptable use of the list, (ii) the compilation problem itself.

 

The following code compiles & runs OK on the Netbeans java development environment (jdk) but gives the error shown below when compiled by gcj running in mingw :

 

Java code :

 

/*

 * Trial2.java

 */

 

import java.awt.*;

import javax.swing.*;

 

public class Trial2 extends JFrame{

 

    JTextArea textArea=new JTextArea(2,20);

   

    public Trial2(){        super("Trial 2");

 

        setSize(600,200);

        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        setVisible(true);        Container contentArea=getContentPane();

        contentArea.setBackground(Color.yellow);

        FlowLayout flow=new FlowLayout();

        contentArea.setLayout(flow);

        textArea.setText("text area print");

        contentArea.add(textArea);

        setContentPane(contentArea);

    }

   

    public static void main(String[] args){       

        Trial2 xyz = new Trial2();       

    }}

 

Mingw operation :

 

Roger@ROGER-HOME /c/msys/1.0/mingw

$ gcj --main=Trial2 Trial2.java

Trial2.java:10: error: Type `JTextArea' not found in declaration of field `textArea'.

       JTextArea textArea=new JTextArea(2,20);

       ^

1 error

 

Any ideas why. Thanks.

 

Ares

 

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users