[7u4] Request for phase 2 approval for CR 7149005: [macosx] Java Control Panel's UI controls are distorted when draging scroll bar.

Alexander Potochkin Alexander.Potochkin at oracle.com
Wed Mar 21 09:42:15 PDT 2012


Hello Mike
> I think attachments are getting stripped out...perhaps there should be a way to provide them as side-car data to a webrev, but made clear that they aren't intended to be checked into a repo. :-/
>
> Anyway, the fix looks reasonable.

Thanks

Here is the test case:

import javax.swing.*;
import javax.swing.border.Border;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

public class CustomBorderTest extends JFrame {

     public CustomBorderTest() {
         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         setLayout(new FlowLayout());

         final JCheckBox cb = new JCheckBox("JCheckBox") {
             @Override
             public void setBorder(Border border) {
                 super.setBorder(border);
                 System.out.println("border = " + border);
             }
         };
         cb.setBorderPainted(true);
         add(cb);

         JButton b1 = new JButton("Test1");
         b1.addActionListener(new ActionListener() {
             @Override
             public void actionPerformed(ActionEvent e) {
                 cb.setText("Test1");
                 cb.setBorder(BorderFactory.createLineBorder(Color.RED, 
10));
             }
         });
         add(b1);

         JButton b2 = new JButton("Test2");
         b2.addActionListener(new ActionListener() {
             @Override
             public void actionPerformed(ActionEvent e) {
                 
cb.setBorder(BorderFactory.createLineBorder(Color.GREEN, 10));
                 cb.setText("Test2");
             }
         });
         add(b2);

         pack();
     }

     public static void main(String... args) throws Exception {
         SwingUtilities.invokeLater(new Runnable() {
             public void run() {
                 new CustomBorderTest().setVisible(true);
             }
         });
     }
}



>
> Thanks,
> ~Mike
>
> On Mar 21, 2012, at 9:08 AM, Alexander Potochkin wrote:
>
>> Hello Mike
>>
>> Please find the test case attached
>>
>> there are two buttons each of them set text and border for a checkbox,
>> they work differently depending on the lines' order
>>
>> this problem breaks the painting of the control panel's
>> when they use a checkbox as a tree renderer
>>
>> Thanks
>> alexp
>>> On Mar 21, 2012, at 7:38 AM, Alexander Potochkin wrote:
>>>
>>>> Bug:7149005
>>>> (not visible via bus.sun.com, please use bugster)
>>>>
>>>> Webrev:http://cr.openjdk.java.net/~alexp/7149005/webrev.00/
>>>> Reviewer: Anthony Petrov,  Dmitry Cherepanov
>>>>
>>>> Rationale for inclusion in 7u4:
>>>>
>>>> This bug heavily affects painting of the Java Control Panel application
>>>> which is very visible by the customers
>>>>
>>>> Verified by SQE
>>>>
>>>> Low risk
>>> The change looks fine...but could you provide any screen shots or steps to reproduce?
>>>
>>> Thanks,
>>> Mike Swingler
>>> Apple Inc.
>>>



More information about the macosx-port-dev mailing list