this.setBorder(BorderFactory.createCompoundBorder( new LineBorder(Color.blue), new EmptyBorder(5, 5, 5, 5))); textLabel.setUI(myUI); textLabel.setFont(new Font("Serif", Font.ITALIC, 24)); this.add(sizeLabel);
public JLabel create(float size, String text) { JLabel label = new JLabel(); label.setUI(labelUI); if (size > 0f) { Font font = label.getFont(); label.setFont(font.deriveFont(size)); } label.setText(text); return label; }
public void setUI(LabelUI ui) { if (ui instanceof ToolScrollBarArrowUI) super.setUI(ui); } };
public void setUI(LabelUI ui) { super.setUI(UI); }
JTabbedPane tabPane = new JTabbedPane(JTabbedPane.LEFT); // Add tabs with no text tabPane.addTab(null, component1); tabPane.addTab(null, component2); // Create vertical labels to render tab titles JLabel labTab1 = new JLabel("Tab #1"); labTab1.setUI(new VerticalLabelUI(false)); // true/false to make it upwards/downwards tabPane.setTabComponentAt(0, labTab1); // For component1 JLabel labTab2 = new JLabel("Tab #2"); labTab2.setUI(new VerticalLabelUI(false)); tabPane.setTabComponentAt(1, labTab2); // For component2
public RepresentativeAnchorLabel(Icon image, int horizontalAlignment) { super(image, horizontalAlignment); super.setUI((LabelUI) createRepresentativeAnchorUI()); }
public static JLabel createConditionLabel(final Icon icon) { final JLabel label = new JLabel(icon); label.setUI((BasicLabelUI)BasicLabelUI.createUI(label)); return label; }
public static JLabel createConditionLabel(final String text) { final JLabel label = new JLabel(text); label.setUI((BasicLabelUI)BasicLabelUI.createUI(label)); return label; }
public void setUI(LabelUI ui) { super.setUI(ui); init(); } }
public void setUI(LabelUI ui) { super.setUI(ui); init(); } }
public void setUI(LabelUI ignore) { super.setUI(ui); init(); } }
public void setUI(LabelUI ui) { super.setUI(ui); init(); } }
public void setUI( javax.swing.plaf.LabelUI ui ) { ui = (MultiLineLabelUI)MultiLineLabelUI.createUI( this ); super.setUI( ui ); }
public void setUI(LabelUI ui) { super.setUI(ui); init(); }
public RepresentativeAnchor(String text, Icon icon, int horizontalAlignment) { super(text, icon, horizontalAlignment); super.setUI((LabelUI) createRepresentativeAnchorUI()); }
public RepresentativeAnchor(Icon image, int horizontalAlignment) { super(image, horizontalAlignment); super.setUI((LabelUI) createRepresentativeAnchorUI()); }
public RepresentativeAnchorLabel(String text, Icon icon, int horizontalAlignment) { super(text, icon, horizontalAlignment); super.setUI((LabelUI) createRepresentativeAnchorUI()); }
/** Creates new form PaletteFontChooserPreviewPanel */ public PaletteFontChooserPreviewPanel() { initComponents(); previewLabel.setUI((LabelUI) PaletteLabelUI.createUI(previewLabel)); previewLabel.setBackground(Color.WHITE); previewLabel.setForeground(Color.BLACK); previewLabel.setOpaque(true); setPreferredSize(new Dimension(100,50)); setMinimumSize(new Dimension(100,50)); }
@Override public void setUI(LabelUI ui) { super.setUI(ui); setForeground(UIUtil.getHyperlinkForeground()); }
public static void main(String[] args) { JLabel verticalLabel = new JLabel("A vertical label"); verticalLabel.setUI(new VerticalLabelUI(false)); showComponent( createPanelAndCenterComponent(verticalLabel), "JVerticalLabel demo" ); } }