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

border property fails on JList

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 1.2.0
    • Fix Version/s: 1.1.5
    • Component/s: client-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      1.1.5
    • CPU:
      unknown
    • OS:
      solaris_2.5.1
    • Verification:
      Not verified

      Description

      /* 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();
          }
      }



        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: