Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Alignment problem



Hi,

I have just noticed, that there is a problem with the component alignment.
Run the following code. JLabel is displayed about 2 pixels higher than JRadioButton.
On Windows and Solaris everything looks OK.

import java.awt.*;
import javax.swing.*;

public class AlignTest extends JFrame
{

public AlignTest()
{
Container cp = getContentPane();
JPanel panel = new JPanel();
JRadioButton radioButton = new JRadioButton("Radio button");
JLabel label = new JLabel("Label");
panel.add(radioButton);
panel.add(label);
cp.add(panel);
setSize(500, 300);
setLocation(100, 100);
setVisible(true);
}

public static void main(String args[])
{
new AlignTest();
}

}

Regards,
Piotr Rychlik
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.