As mentioned above it's quite a simple objective but seems quite complex to accomplish - there seems no in-built method available for adding a border to only one side of a button (which makes sense I suppose since a border is supposed to SURROUND the button).
Did you find anything useful in the Java™ Tutorials? The bottom part of the second image there seems to show a Border on the left only, and the text suggests they set the width to 0 on the other sides, but I didn't read the whole of the link.
it is certainly possible, what you need is MatteBorder (see the API). I have a KillerSudoku application, where I indicate the groups using this MatteBorder. I made a Map<String, MatteBorder>, where the String is say "TL", meaning the border of the component should be top and left. I can then simply say:
The code I use is: (pixels indicate how large the border part will be, in pixels)
posted 4 weeks ago
Thank you both - the MatteBorder is definitely the answer here I didn't realise how simple it was until I applied it thanks a lot for the help!