lists.zerezo.com



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

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



Hi,

It appears, that I see this question on this list for a third time?

> 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.

Ask google before asking here. It tells me, that support for AWT and 
SWING are incomplete.
What do you get, if you replace

import javax.swing.*;

with

import javax.swing.JTextArea;

?

> 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

-- 
Aurimas

-------------------------------------------------------------------------
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