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

JInternalFrame title not antialiased in Nimbus LaF

    XMLWordPrintable

Details

    • b42
    • x86
    • windows_xp

    Backports

      Description

        FULL PRODUCT VERSION :
        1.7.0-b147

        ADDITIONAL OS VERSION INFORMATION :
        Windows XP SP3 Version 5.1

        A DESCRIPTION OF THE PROBLEM :
        JInternalFrame title is antialiased as for JLabel by Metal, Windows, Motif LaFs (ie yes, yes, no). However In Nimbus there is a mismatch - JLabel is antialiased but not JInternalFrame.

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Execute test code with arguments 1-4.


        REPRODUCIBILITY :
        This bug can be reproduced always.

        ---------- BEGIN SOURCE ----------
        import javax.swing.JDesktopPane;
        import javax.swing.JFrame;
        import javax.swing.JInternalFrame;
        import javax.swing.JLabel;
        import javax.swing.SwingUtilities;
        import javax.swing.UIManager;
        public class InternalFrameAliasing extends JFrame{
        public InternalFrameAliasing(int test){
        super(InternalFrameAliasing.class.getSimpleName());
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setBounds(test*50+100,test*75+5,250,100);
        JDesktopPane desktop=new JDesktopPane();
        setContentPane(desktop);
        final JInternalFrame frame=new JInternalFrame("Am I anti-aliased?" +
        " [" +
        lafNames[test].replaceAll("[^A-Z]+(.+)LookAndFeel","$1")+
        "]");
        frame.setSize(300,300);
        frame.add(new JLabel("And am I?"));
        frame.setVisible(true);
        desktop.add(frame);
        SwingUtilities.invokeLater(new Runnable(){public void run(){
        try{
        frame.setSelected(true);
        frame.setMaximum(true);
        }catch(java.beans.PropertyVetoException e){
        e.printStackTrace();
        }
        }});
        }
        private final static String[]lafNames= {
        "javax.swing.plaf.metal.MetalLookAndFeel",
        UIManager.getSystemLookAndFeelClassName(),
        "com.sun.java.swing.plaf.motif.MotifLookAndFeel",
        "com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel"
        };
        public static void main(final String[]args){
        if(args.length<1)throw new IllegalArgumentException(
        "Supply test number 1 to 4");
        SwingUtilities.invokeLater(new Runnable(){public void run(){
        int test=Integer.valueOf(args[0]);
        try{
        UIManager.setLookAndFeel(lafNames[--test]);
        }catch(Exception notSet){
        notSet.printStackTrace();
        }
        new InternalFrameAliasing(test).setVisible(true);
        }});
        }
        }

        ---------- END SOURCE ----------

        Attachments

          Issue Links

            Activity

              People

                serb Sergey Bylokhov
                webbuggrp Webbug Group
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: