List of utility methods to do JLabel Font
void | bold(final JLabel label) Apply bold font to a Jlabel. final Font font = label.getFont();
label.setFont(font.deriveFont(font.getStyle() ^ Font.BOLD));
|
void | setBold(JLabel label) Make font of JLabel bold label.setFont(label.getFont().deriveFont(Font.BOLD)); |
void | setLabelBold(JLabel existingLabel, boolean bold) Set the bold attribute of an existing label Font f = existingLabel.getFont(); if (bold) { existingLabel.setFont(f.deriveFont(f.getStyle() ^ Font.BOLD)); } else { existingLabel.setFont(f.deriveFont(f.getStyle() | Font.BOLD)); |
void | setLabelBold(JLabel label) Modifica fontul de la un label si il face bold Font oldFont = label.getFont(); label.setFont(oldFont.deriveFont(Font.BOLD)); |
void | setNoBoldJLabels(Container parent) set No Bold J Labels for (Component comp : parent.getComponents()) { if (comp instanceof JLabel) { JLabel label = (JLabel) comp; Font f = label.getFont(); label.setFont(f.deriveFont(f.getStyle() & ~Font.BOLD)); } else if (comp instanceof Container) { setNoBoldJLabels((Container) comp); |
JLabel | unboldLabel(JLabel label) unbold Label Font font = label.getFont();
label.setFont(font.deriveFont(font.getStyle() & ~Font.BOLD));
return label;
|