-
Bug
-
Resolution: Duplicate
-
P2
-
None
-
1.1.6
-
None
-
generic
-
generic
With the new JFC (swing) graphics libraries, the input field type
JTextField doesn't accept cut and paste commands under any OS.
I'm compiling with Sun JDK 1.1.6
I'm using Swing 1.1beta2
I've run this with Sun JDK 1.1.6 on Linux, and as an applet with
Netscape 4.06/Linux and Netscape 4.06/Windows NT.
All exhibit the problem in the same way.
Here is a test program that opens a window using AWT (traditional java)
and a window using JFC (swing/new java). You'll see that you can paste
into the TextField that comes from AWT, but can't paste into the
JTextField that comes from swing.
------- test1.java:
import com.sun.java.swing.*;
import java.awt.*;
class test1 {
public static void main(String[] args) {
Frame f = new Frame("awt Frame & TextField");
f.setLayout(new GridLayout(1, 1));
f.add(new TextField());
f.setSize(200, 80);
f.setVisible(true);
JFrame jf = new JFrame("swing JFrame & JTextField");
jf.getContentPane().setLayout(new GridLayout(1, 1));
jf.getContentPane().add(new JTextField());
jf.setSize(200, 80);
jf.setVisible(true);
}
}
JTextField doesn't accept cut and paste commands under any OS.
I'm compiling with Sun JDK 1.1.6
I'm using Swing 1.1beta2
I've run this with Sun JDK 1.1.6 on Linux, and as an applet with
Netscape 4.06/Linux and Netscape 4.06/Windows NT.
All exhibit the problem in the same way.
Here is a test program that opens a window using AWT (traditional java)
and a window using JFC (swing/new java). You'll see that you can paste
into the TextField that comes from AWT, but can't paste into the
JTextField that comes from swing.
------- test1.java:
import com.sun.java.swing.*;
import java.awt.*;
class test1 {
public static void main(String[] args) {
Frame f = new Frame("awt Frame & TextField");
f.setLayout(new GridLayout(1, 1));
f.add(new TextField());
f.setSize(200, 80);
f.setVisible(true);
JFrame jf = new JFrame("swing JFrame & JTextField");
jf.getContentPane().setLayout(new GridLayout(1, 1));
jf.getContentPane().add(new JTextField());
jf.setSize(200, 80);
jf.setVisible(true);
}
}
- duplicates
-
JDK-4066145 Not all keyboard events are delivered
-
- Closed
-