I''m using OpenJDK 1.7.0_04. I'm using the client property "segmentedTextured" on some buttons. The top and bottom of the buttons are not rendered. Here's the simplest reproduction code I've been able to create.
import javax.swing.*;
import java.awt.*;
public class SegmentedTexturedButtonTest {
public static void main(String[] args) {
JToggleButton leftButton = new JToggleButton("Left Button");
leftButton.putClientProperty("JButton.buttonType", "segmentedTextured");
leftButton.putClientProperty("JButton.segmentPosition", "first");
leftButton.setFocusable(false);
JToggleButton rightButton = new JToggleButton("Right Button");
rightButton.putClientProperty("JButton.buttonType", "segmentedTextured");
rightButton.putClientProperty("JButton.segmentPosition", "last");
rightButton.setFocusable(false);
JPanel contentPane = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
contentPane.add(leftButton);
contentPane.add(rightButton);
JFrame frame = new JFrame("Test");
frame.setContentPane(contentPane);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
frame.setVisible(true);
}
}
This problem occurs with JToggleButtons that use icons too, in fact worse so.
The same code renders properly on Apple's Java 6.