Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4092920

border property fails on JList

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.1.5
    • 1.2.0
    • client-libs
    • None
    • 1.1.5
    • unknown
    • solaris_2.5.1
    • Not verified

      /* setenv JDKHOME /home/hmuller/ws/jdk12/build/solaris
       * ${JDKHOME}/bin/javac -classpath ${JDKHOME}/classes JListBorder.java
       * ${JDKHOME}/bin/java -classpath .:${JDKHOME}/classes JListBorder
       */

      import java.awt.*;
      import java.awt.event.*;
      import java.awt.swing.*;
      import java.awt.swing.event.*;
      import java.awt.swing.border.*;


      /**
       * Create a JList with a big red border. As of Swing0.6, the border
       * obscures the list items.
       */
      public class JListBorder
      {
          public static void main(String[] args)
          {
      JList list = new JList(new String[]{"one", "two", "free", "four"});
      list.setBorder(new LineBorder(Color.red, 10));

      WindowListener l = new WindowAdapter() {
      public void windowClosing(WindowEvent e) {System.exit(0);}
      };
      JFrame f = new JFrame("JListBorder");
      f.addWindowListener(l);
      f.getContentPane().add(list);
      f.pack();
      f.show();
          }
      }



            sswingtrsunw Swingtraq Swingtraq (Inactive)
            sswingtrsunw Swingtraq Swingtraq (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: