I created a JPanel and i have added a TitleBorder with BorderFactory but it’s showing a blue line around the panel.
I would like to remove this line.
Any suggestions?
Thank you
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
never tried to extract this value from
TitleBorders API, methods are protected, or by usingUIManagerhave to use LineBorder inside TitleBorder
simpliest syntax could be
xxx.setBorder(new TitledBorder(new LineBorder(Color.ORANGE, 1), "label"));or get theColorfrom (for example)myPanel.getBackground()instread ofColor.ORANGEanother options are (is possible)
move desciption (top, bottom…..)
change
Fontchange
Foreground(Colorfor description)more options and description in Oracle tutorial How to Use Borders (CompounBorders)
for example