-
Bug
-
Resolution: Won't Fix
-
P3
-
7
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2210322 | 7u2 | Pavel Porvatov | P3 | Closed | Won't Fix |
Operating system: Windows XP SP2
JDK version: I found the bug in 1.4, 1.5, 1.6, 1.7
JSpinner increase/decrease buttons can have icons of different sizes. See the attached screen shot.
There is a test case:
============ Source Begin ===============
import javax.swing.*;
import java.awt.*;
public class JSpinnerArrowBug {
private JFrame frame;
public static void main(String[] args) throws Exception {
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
(new JSpinnerArrowBug()).setupUI();
}
});
}
private void setupUI() {
frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JSpinner sp = new JSpinner(new SpinnerNumberModel(10, 1, 20, 1));
sp.setPreferredSize(new Dimension(50, 25));
frame.getContentPane().add(sp);
frame.getContentPane().setLayout(new FlowLayout());
frame.setSize(new Dimension(100, 100));
frame.setLocationRelativeTo(null);
frame.setVisible(true);
}
}
============ Source End ================
Testing strategy:
1. Run the test
2. Note that the arrow icons have different sizes
Expected results:
Arrow icons have the same size
Actual results:
Arrow icon of the upper button is larger than the icon of the lower button.
JDK version: I found the bug in 1.4, 1.5, 1.6, 1.7
JSpinner increase/decrease buttons can have icons of different sizes. See the attached screen shot.
There is a test case:
============ Source Begin ===============
import javax.swing.*;
import java.awt.*;
public class JSpinnerArrowBug {
private JFrame frame;
public static void main(String[] args) throws Exception {
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
(new JSpinnerArrowBug()).setupUI();
}
});
}
private void setupUI() {
frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JSpinner sp = new JSpinner(new SpinnerNumberModel(10, 1, 20, 1));
sp.setPreferredSize(new Dimension(50, 25));
frame.getContentPane().add(sp);
frame.getContentPane().setLayout(new FlowLayout());
frame.setSize(new Dimension(100, 100));
frame.setLocationRelativeTo(null);
frame.setVisible(true);
}
}
============ Source End ================
Testing strategy:
1. Run the test
2. Note that the arrow icons have different sizes
Expected results:
Arrow icons have the same size
Actual results:
Arrow icon of the upper button is larger than the icon of the lower button.
- backported by
-
JDK-2210322 JSpinner: increase/decrease buttons can have icons of different sizes
- Closed
- relates to
-
JDK-6532833 PIT: Metal LAF - The right side border is not shown for the Spinner after the removing the buttons
- Closed