Selection not shown when focus lost

XMLWordPrintable

    • Type: Bug
    • Resolution: Not an Issue
    • Priority: P2
    • None
    • Affects Version/s: 1.2.2
    • Component/s: client-libs
    • None
    • unknown
    • solaris_2.6

      Text in a JTextArea that is selected has a different background color.
      When that text area loses focus, either because a button is pushed or
      the window loses focus, the background color of the text area selection
      reverts to the nonselected background color.

      Very similar to 4244100

      JDK 1.2.2 reference Solaris and 1.2.2 Win32, not happening with 1.2.1.
      import java.awt.*;
      import java.awt.event.*;
      import javax.swing.*;
      import javax.swing.event.*;

      public class TestSelect extends JFrame implements ActionListener {

       JCheckBox ckbox;
       JRadioButton radio;
       JScrollPane panel;
       JTextArea ta;
       Container cp;

       public TestSelect() {
        super ("Test Select");
        cp = getContentPane();
        cp.setLayout (new GridLayout(2,2));

        ckbox = new JCheckBox("check Box");
        ckbox.addActionListener(this);
        cp.add(ckbox);

        radio = new JRadioButton("radio Button");
        radio.addActionListener(this);
        cp.add(radio);

        ta = new JTextArea();
        panel = new JScrollPane (ta);
        cp.add(panel);

        setSize(250, 200);
        setVisible(true);
       }

       public void actionPerformed (ActionEvent evt) {
        System.out.println (">>action " + evt);
       }

       public static void main (String[] args) {
        new TestSelect();
       }
      }

            Assignee:
            J. Duke
            Reporter:
            Matt Hosanee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: