swingx
  1. swingx
  2. SWINGX-1508

JXSearchField not rendering on OS X

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.4
    • Fix Version/s: 1.6.4
    • Component/s: None
    • Labels:
      None
    • Environment:

      OS X Lion

      Description

      Originally reported here http://www.java.net/forum/topic/javadesktop/java-desktop-technologies/swinglabs/swingx-164-jxsearchfield-not-rendering-os-x

      This is a definite regression in 1.6.3 -> 1.6.4 on OS X. I just tried out the latest SwingX 1.6.4 staging release, and my JXSearchField's are no longer rendering on OS X (although the magnifying glass is there). If I type on where they should be, the white background and rounded borders appear, and continue to exist if I type, but once all text is removed and the focus goes elsewhere, the white background of the text area (with rounded corners) just disappears and leaves a gaping hole in my app.

      Happy to provide a screenshot if that helps.

        Activity

        Hide
        fommil added a comment - - edited

        This code shows the bug with SwingX 1.6.4, but renders fine with 1.6.3.

        One small change to my report above - the white background actually only appears once something is typed.

        public class JXSearchRegression extends javax.swing.JFrame {
        
            public JXSearchRegression() {
                org.jdesktop.swingx.JXSearchField jXSearchField1 = new org.jdesktop.swingx.JXSearchField();
                setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
                getContentPane().add(jXSearchField1, java.awt.BorderLayout.CENTER);
                pack();
            }
        
            public static void main(String args[]) {
                new JXSearchRegression().setVisible(true);
            }
        }
        
        Show
        fommil added a comment - - edited This code shows the bug with SwingX 1.6.4, but renders fine with 1.6.3. One small change to my report above - the white background actually only appears once something is typed. public class JXSearchRegression extends javax.swing.JFrame { public JXSearchRegression() { org.jdesktop.swingx.JXSearchField jXSearchField1 = new org.jdesktop.swingx.JXSearchField(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); getContentPane().add(jXSearchField1, java.awt.BorderLayout.CENTER); pack(); } public static void main(String args[]) { new JXSearchRegression().setVisible(true); } }
        Hide
        fommil added a comment -

        As requested in the forum, I checked out trunk*. Rolling back PromptTextFieldUI to r3756 brings the white background back into view - it is the culprit.

        As a side note, this was not trivial to do due to the modularised setup. I am surprised that you have gone for a module approach. SwingX is such a small project that this level of added bureaucracy appears to only increase the barrier to entry: both for users trying to understand what they need to install and for bug testers/reporters like me who would like to just run a testcase.

        • PS: originally I tried to use the sources from the maven build, to avoid having to deal with java.net. This didn't work because a few classes were missing, such as @JavaBean. As expected, pulling from java.net was a long and arduous process that seen me have to pull the whole repository instead of just trunk due to trademark java.net user hatred. Also, why have you got so many binary files and native code in the repository? Doesn't maven do away with the need for jar dependencies? I'm curious what the native code and ASM manipulation is needed for.
          • PPS: since you're already doing ASM manipulation, have a look at Project Lombok and make all your bean code a lot cleaner.
        Show
        fommil added a comment - As requested in the forum, I checked out trunk*. Rolling back PromptTextFieldUI to r3756 brings the white background back into view - it is the culprit. As a side note, this was not trivial to do due to the modularised setup. I am surprised that you have gone for a module approach. SwingX is such a small project that this level of added bureaucracy appears to only increase the barrier to entry: both for users trying to understand what they need to install and for bug testers/reporters like me who would like to just run a testcase. PS: originally I tried to use the sources from the maven build, to avoid having to deal with java.net. This didn't work because a few classes were missing, such as @JavaBean. As expected, pulling from java.net was a long and arduous process that seen me have to pull the whole repository instead of just trunk due to trademark java.net user hatred. Also, why have you got so many binary files and native code in the repository? Doesn't maven do away with the need for jar dependencies? I'm curious what the native code and ASM manipulation is needed for. PPS: since you're already doing ASM manipulation, have a look at Project Lombok and make all your bean code a lot cleaner.
        Hide
        Karl Schaefer added a comment -

        SWINGX-1508: Cannot ignore property changes in Mac like we can in Windows. I am guessing some of the hidden properties that the Mac uses must be propagated for painting to work correctly. Bifurcate on OSX to ensure that we do the best we can for Windows while still supporting Mac.

        In revision 4199.

        Show
        Karl Schaefer added a comment - SWINGX-1508 : Cannot ignore property changes in Mac like we can in Windows. I am guessing some of the hidden properties that the Mac uses must be propagated for painting to work correctly. Bifurcate on OSX to ensure that we do the best we can for Windows while still supporting Mac. In revision 4199.
        Hide
        fommil added a comment -

        OK, that works, thanks.

        Show
        fommil added a comment - OK, that works, thanks.

          People

          • Assignee:
            Karl Schaefer
            Reporter:
            fommil
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: