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

PIT: Metal LAF - The right side border is not shown for the Spinner after the removing the buttons

XMLWordPrintable

    • b126
    • generic
    • generic
    • Verified

      This is the Result of the bug fix 6514599

      import java.awt.*;
      import javax.swing.*;

      public class JSpinnerBug2
      {
          public static void main(String[] args)
          {
              // create a JSpinner and set a value
              JSpinner spinner = new JSpinner();
              spinner.setValue(new Integer(1234567890));
              
              // get the arrow buttons
              Component arrowUp = spinner.getComponent(0);
              Component arrowDown = spinner.getComponent(1);
              
              // try remove both buttons from the layout
              LayoutManager layout = spinner.getLayout();
              layout.removeLayoutComponent(arrowUp);
              layout.removeLayoutComponent(arrowDown);
              
              // create a frame and add the spinner spinner
              JFrame frame = new JFrame("Only the arrow down is missing");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              Container pane = frame.getContentPane();
              pane.setLayout(new FlowLayout());
              pane.add(spinner);
              
              // show the frame
              frame.setBounds(0, 0, 300, 150);
              frame.setVisible(true);
          }
      }

      Run the this above stated test on the Metal LAF. Now look at the right side of the Spinner, the border is missing.

            rupashka Pavel Porvatov (Inactive)
            esubramasunw Elancheran Subramanian (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: