Hi Carlo,

Can you check the two snippets at the end of this mail?
I tested both on Mac OS X 10.4.7, jdk 1.4 and jdk 1.5_05 and they deliver the same result (ULC and Swing).
The separation is a small (very small) space, not a bar.

Best regards
Sandro



On Aug 13, 2006, at 5:40 PM, Carlo Germanà wrote:

Hi

I've noticed that the addSeparator() method in ULCToolBar doesn't work on MacOSX 10.4 (jdk 1.5_06). The ULC application does not crash but a call to the addSeparator() method has no effect on Mac OSX.
Running the same application on Windows XP clients works properly.

Regards,
Carlo





public class MacToolbarSwing {
    public static void main(String[] args){
        JFrame frame = new JFrame("Swing");
        frame.getContentPane().add(createToolbar());

        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.pack();
        frame.setVisible(true);
    }

    private static JToolBar createToolbar() {
        JToolBar toolbar = new JToolBar();
        toolbar.setFloatable(false);
        toolbar.add(new JButton("First"));
        toolbar.add(new JButton("Second"));
        toolbar.addSeparator();
        toolbar.add(new JButton("Third"));
        return toolbar;
    }
}


public class MacToolbarSnippet extends AbstractApplication {
    public void start() {
        ULCFrame frame = new ULCFrame();
        frame.add(createToolbar());

        frame.setDefaultCloseOperation(ULCFrame.TERMINATE_ON_CLOSE);
        frame.pack();
        frame.setVisible(true);
    }

    private ULCToolBar createToolbar() {
       ULCToolBar toolBar = new ULCToolBar();
       toolBar.setFloatable(false);
       toolBar.add(new ULCButton("First"));
       toolBar.add(new ULCButton("Second"));
       toolBar.addSeparator();
       toolBar.add(new ULCButton("Third"));
       return toolBar;
    }

      public static void main(String[] args) {
        DevelopmentRunner.setApplicationClass(MacToolbarSnippet.class);
        DevelopmentRunner.run();
    }
}

_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer

Reply via email to