You are viewing a plain text version of this content. The canonical link for it is here.
Posted to regexp-dev@jakarta.apache.org by Takashi Okamoto <to...@rd.nttdata.co.jp> on 2000/12/07 10:54:40 UTC

[PROPOSAL & PATCH] using AWT instead of Swing

Hello ,jakarta-regexp developers (maybe Jon?).

I propose using Frame instead of JFrame at REDemo.java.
I'm preparing jakarta-regexp package for Debian GNU Linux.
DFSG (Debian Free Software Guildeline) says:

-----
If you source package can compile (correctly) only
with non-free tools (the only free Java compilers seems to be guavac
and gcj and may be jikes if it changes its licence), it
cannot go to main. If your package itself is free, it must goes to
contrib.
-----

However Jakarta-Regexp depends on Swing ,and I can't build
jakarta-regexp package as Debian 'main' package beause Swing is
non-free.

Fortunately ,we are permited to redistribute modified jakarta-regexp
under Apache Software License.
I used Frame instead of JFrame at REDemo and it's no problem.
Could you use Frame instead of JFrame ,please?
It will be better that original code doesn't depend non-free library:-)

regards.
-------------------
Takashi Okamoto


Patch for using Frame instead of JFrame at REDemo.java.


Index: org/apache/regexp/REDemo.java
===================================================================
RCS file:
/home/cvspublic/jakarta-regexp/src/java/org/apache/regexp/REDemo.java,v
retrieving revision 1.1
diff -u -r1.1 REDemo.java
--- org/apache/regexp/REDemo.java 2000/04/27 01:22:33 1.1
+++ org/apache/regexp/REDemo.java 2000/12/07 04:05:45
@@ -61,7 +61,6 @@
 import java.awt.*;
 import java.awt.event.*;
 import java.io.*;
-import javax.swing.*;

 /**
  * Interactive demonstration and testing harness for regular expressions
classes.
@@ -244,7 +243,7 @@
      */
     static public void main(String[] arg)
     {
-        JFrame f = new JFrame("RE Demo");
+        Frame f = new Frame("RE Demo");
         // f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         f.addWindowListener(new WindowAdapter()
         {
@@ -253,10 +252,8 @@
                 System.exit(0);
             }
         });
-        Container c = f.getContentPane();
-        c.setLayout(new FlowLayout());
         REDemo demo = new REDemo();
-        c.add(demo);
+        f.add(demo);
         demo.init();
         f.pack();
         f.setVisible(true);



Re: [PROPOSAL & PATCH] using AWT instead of Swing

Posted by Jon Stevens <jo...@latchkey.com>.
on 12/7/2000 1:54 AM, "Takashi Okamoto" <to...@rd.nttdata.co.jp> wrote:

> I used Frame instead of JFrame at REDemo and it's no problem.
> Could you use Frame instead of JFrame ,please?
> It will be better that original code doesn't depend non-free library:-)

done.

-jon

-- 
Honk if you love peace and quiet.