It works fine under blackdown jdk1.1.7 & swing1.1 on my RH5 box - in
fact it also works fine with the latest kaffe (v1beta4) release.
Guess it must be to do with either 1.2 or new swing beta.
Maks.
Gerald Preissler wrote:
>
> Hello folks,
>
> could anyone please tell me if this is a problem with the Blackdown
> JVM or with Swing pre Java 1.2. Under JDK 1.2 on NT, the attached code
> works as I expect it to, i.e. if I click in a TextField, I see a caret
> and the event-listeners get events when I click, press enter etc.
> Under Blackdown 1.1.7 with Swing 1.1.1 Beta 2, there is no caret if I
> click in one of the JTextFields, and I donīt get any events from the
> listener. I donīt have a win-machine with jdk1.1.7 and Swing handy to
> test there.
>
> Thanks
> Jerry
>
> --8<-- cut here
> import java.awt.*;
> import java.awt.event.*;
> import javax.swing.*;
>
> public class test4 extends JFrame implements ActionListener,FocusListener{
>
> public test4() {
> super ("System Diary - demo for simple tree");
> setSize(350,80);
> addWindowListener (new BasicWindowMonitor());
> JTextField b1 = new JTextField("Button 1");
> JTextField b2 = new JTextField("Button 2");
> b1.addActionListener(this);
> b2.addActionListener(this);
> b1.addFocusListener(this);
> b2.addFocusListener(this);
> JSplitPane test = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,b1,b2);
> getContentPane().add(test);
>
> setVisible(true);
> }
>
> public void actionPerformed(ActionEvent e) {
> System.out.println(e);
> }
>
> public void focusGained(FocusEvent e) {
> System.out.println(e);
> }
>
> public void focusLost(FocusEvent e) {
> System.out.println(e);
> }
>
> public static void main (String[] args)
> {
> test4 t = new test4();
> }
> }
> --8=--cut here
> --
> ||| ... and now for something completely different ...
> o o
> --m--!--m--
>
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
--
Remember Darwin; building a better mousetrap merely results in smarter
mice.
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]