Skip to content

Commit

Permalink
Made the text in the help popup wrap
Browse files Browse the repository at this point in the history
  • Loading branch information
mcasperson committed May 22, 2017
1 parent f76f7e8 commit fce5f9c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,16 @@ public void displayMessage(final String message,
/*
Create the message
*/
final JLabel label = new JLabel(message);
final JLabel label = new JLabel(
"<html><p style='padding: 20px'>"
+ message
+ "</p></html>");
final Font labelFont = label.getFont();
label.setFont(new Font(labelFont.getName(), Font.PLAIN, fixedFont));
label.setHorizontalAlignment(JLabel.CENTER);
label.setVerticalAlignment(JLabel.CENTER);
label.setOpaque(true);
label.setMaximumSize(new Dimension(fixedWidth, fixedHeight));
label.setBackground(MESSAGE_BACKGROUND_COLOUR);
label.setBorder(BorderFactory.createLineBorder(Color.BLACK, BORDER_THICKNESS));
frame.getContentPane().add(label);
Expand Down

0 comments on commit fce5f9c

Please sign in to comment.