This would be more complicated if you have other characters on your button, but here's a simple example of how you could override the JButton's paintComponent method and rotate the graphics.
public class UITest
{
public static void main(String a[]) throws ParseException
{
JFrame frame = new JFrame();
JPanel panel = new JPanel();
JButton button = new JButton(){
@Override
protected void paintComponent(Graphics g)
{
super.paintComponent(g);
Graphics2D g2d = ((Graphics2D)g);
// rotate the graphics
AffineTransform oldTransform = g2d.getTransform();
AffineTransform newTransform = AffineTransform.getRotateInstance(Math.toRadians(270));
g2d.setTransform(newTransform);
g2d.drawString("»", -17, 17);
g2d.setTransform(oldTransform);
}
};
button.setPreferredSize(new Dimension(30, 30));
panel.add(button);
frame.setContentPane(panel);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
}
}