OSX not placing windows of Swing application in a sensible location
Anthony Petrov
anthony.petrov at oracle.com
Tue Oct 9 03:23:23 PDT 2012
Thanks. We'll take a look at it once the bug is in our bug tracking system.
--
best regards,
Anthony
On 10/9/2012 1:40 PM, Paul Taylor wrote:
> On 05/10/2012 13:30, Anthony Petrov wrote:
>> Please file a bug at http://bugs.sun.com/
>>
>> --
>> best regards,
>> Anthony
> Bugs submitted (funny that the url is sun and bugs.oracle.com doesnt exist)
>
> Whilst waiting for it to be confirmed, here is the test case FYI
>
> import javax.swing.*;
> import java.awt.event.ActionEvent;
> import java.awt.event.ActionListener;
>
> class Test
> {
> public static void main(final String[] args) throws Exception
> {
> setupScreen();
> }
>
>
> public static void setupScreen() throws Exception
> {
> UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
> JFrame frame = new JFrame("test");
> JButton button = new JButton("go");
> button.addActionListener(
> new ActionListener()
> {
> @Override
> public void actionPerformed(ActionEvent e)
> {
> JDialog dialog = new JDialog();
> dialog.add(new JTextArea(20,20));
> dialog.pack();
> dialog.setVisible(true);
> }
> }
> );
> frame.setLocationByPlatform(true);
> frame.add(button);
> frame.pack();
> frame.setVisible(true);
> }
> }
More information about the macosx-port-dev
mailing list