I have a JButton to which i am just adding a text string. I have to align the text to the left of the button. I have gone through the API. There are constructors to align the text with respect to an icon but not for simple text. I tried the following code. It didn't work. Does anyone know?
linksButton = new JButton(link);
linksButton.setHorizontalTextPosition(SwingConstants.LEFT);
linksButton.setBounds(xComp,yComp,width,height);
I also tried using the setComponentOrientation method. It didn't work.