Example usage for javax.swing JLabel setFont

List of usage examples for javax.swing JLabel setFont

Introduction

In this page you can find the example usage for javax.swing JLabel setFont.

Prototype

@BeanProperty(preferred = true, visualUpdate = true, description = "The font for the component.")
public void setFont(Font font) 

Source Link

Document

Sets the font for this component.

Usage

From source file:com.eviware.soapui.support.components.SimpleForm.java

public void appendHeadingAndHelpButton(String text, String helpUrl) {
    JLabel label = new JLabel(text);
    Font font = label.getFont();//from www .j  a va2  s  .  c  om
    Font fontBold = new Font(font.getName(), Font.BOLD, font.getSize());
    label.setFont(fontBold);
    JPanel innerPanel = new JPanel();
    innerPanel.setLayout(new BoxLayout(innerPanel, BoxLayout.X_AXIS));
    innerPanel.add(label);
    innerPanel.add(Box.createHorizontalGlue());
    innerPanel.add(UISupport.createFormButton(new ShowOnlineHelpAction(helpUrl)));
    append(null, null, innerPanel, null, DEFAULT_LABEL_COLUMN, getColumnSpanToTheEnd(DEFAULT_LABEL_COLUMN));
}

From source file:edu.ku.brc.af.tasks.subpane.StatsPane.java

/**
 * Creates a StatsPane./*from w  ww .j a v a  2s.  c om*/
 * @param name name of pane
 * @param task the owning task
 * @param resourceName the name of the resource that contains the configuration
 * @param useSeparatorTitles indicates the group panels should use separator titles instead of boxes
 * @param bgColor the background color
 * @param upperDisplayComp a display component for the upper half of the screen
*/
public StatsPane(final String name, final Taskable task, final String resourceName,
        final boolean useSeparatorTitles, final Color bgColor, final JComponent upperDisplayComp) {
    super(name, task);

    this.resourceName = resourceName;
    this.useSeparatorTitles = useSeparatorTitles;
    this.upperDisplayComp = upperDisplayComp;

    if (bgColor != null) {
        this.bgColor = bgColor;
    } else {
        this.bgColor = Color.WHITE;
    }
    setBackground(this.bgColor);
    setOpaque(true);

    setLayout(new BorderLayout());

    if (upperDisplayComp == null) {
        JLabel lbl = UIHelper.createI18NLabel("COLL_STATS", SwingConstants.CENTER);
        int pntSize = lbl.getFont().getSize();
        lbl.setFont(lbl.getFont().deriveFont((float) pntSize + 2).deriveFont(Font.BOLD));
        add(lbl, BorderLayout.NORTH);
    }

    init();

    registerPrintContextMenu();
}

From source file:com.polivoto.vistas.Charts.java

private JPanel hacerTabla(Pregunta pregunta, List<Opcion> opciones, String perfil) {
    Tabla panel = new Tabla();
    //Panel completo
    //scrollPanel.setBackground(Color.blue);

    //Ttulo pregunta
    JLabel tituloPregunta = new JLabel("\t" + pregunta.getTitulo() + " (" + perfil + ")");
    tituloPregunta.setFont(new Font("Roboto", 1, 24));
    tituloPregunta.setForeground(Color.black);
    tituloPregunta.setVerticalAlignment(JLabel.CENTER);
    JPanel panelHeader = panel.getjPanelHead();
    panelHeader.add(tituloPregunta);/*w w  w.  j  av a  2s  .co m*/
    panelHeader.setOpaque(false);
    panelHeader.setPreferredSize(panelGrafica.getSize());

    //Panel de la tabla
    JPanel tabla = new JPanel(new GridLayout(pregunta.obtenerCantidadDeOpciones() + 2, 3, 5, 5));
    tabla.setBackground(Color.white);

    //Poner el titulo de cada columna
    for (int i = 0; i < 3; i++) {
        JPanel tilt = new JPanel();
        tilt.setBackground(new Color(137, 36, 31));
        JLabel label = new JLabel(i == 0 ? "Opcion" : i == 2 ? "Porcentaje" : "Cantidad");
        label.setFont(new Font("Roboto", 1, 18));
        label.setForeground(Color.white);
        tilt.add(label);
        tilt.setSize(new Dimension(0, 35));
        tilt.setBorder(new MatteBorder(1, 1, 1, 1, new Color(230, 230, 230)));
        tabla.add(tilt);
    }

    int sum = 0;

    for (Opcion opcion : opciones) {
        sum += opcion.getCantidad();
    }

    for (Opcion opc : opciones) {
        JPanel p1 = new JPanel(new GridLayout(0, 1));
        p1.setBackground(Color.white);
        p1.setBorder(new MatteBorder(1, 1, 1, 1, new Color(230, 230, 230)));
        JTextArea l1 = new JTextArea(opc.getNombre());

        l1.setWrapStyleWord(true);
        l1.setLineWrap(true);
        l1.setFont(new Font("Roboto", 0, 18));
        l1.setEditable(false);
        l1.setBorder(null);
        p1.setPreferredSize(l1.getSize());
        p1.add(l1);
        tabla.add(p1);

        JPanel p2 = new JPanel();
        p2.setBackground(Color.white);
        p2.setBorder(new MatteBorder(1, 1, 1, 1, new Color(230, 230, 230)));
        JLabel l2 = new JLabel("" + opc.getCantidad());
        l2.setFont(new Font("Roboto", 0, 18));
        p2.add(l2);
        tabla.add(p2);

        JPanel p3 = new JPanel();
        p3.setBackground(Color.white);
        p3.setBorder(new MatteBorder(1, 1, 1, 1, new Color(230, 230, 230)));
        double porcentaje = (opc.getCantidad() * 100.0) / sum;
        JLabel l3 = new JLabel(String.format("%.2f", porcentaje) + "%");
        l3.setFont(new Font("Roboto", 0, 18));
        p3.add(l3);
        tabla.add(p3);
    }

    JPanel p1 = new JPanel();
    p1.setBackground(Color.white);
    p1.setBorder(new MatteBorder(1, 1, 1, 1, new Color(230, 230, 230)));
    JLabel l1 = new JLabel("Total");
    l1.setHorizontalTextPosition(JLabel.LEFT);
    l1.setFont(new Font("Roboto", 1, 18));
    p1.add(l1);
    tabla.add(p1);

    JPanel p2 = new JPanel();
    p2.setBackground(Color.white);
    p2.setBorder(new MatteBorder(1, 1, 1, 1, new Color(230, 230, 230)));
    JLabel l2 = new JLabel("" + sum);
    l2.setFont(new Font("Roboto", 1, 18));
    p2.add(l2);
    tabla.add(p2);

    JPanel p3 = new JPanel();
    p3.setBackground(Color.white);
    p3.setBorder(new MatteBorder(1, 1, 1, 1, new Color(230, 230, 230)));
    JLabel l3 = new JLabel("100.00%");
    l3.setFont(new Font("Roboto", 1, 18));
    p3.add(l3);
    tabla.add(p3);

    panel.getjPanelContent().add(tabla, BorderLayout.CENTER);

    //Relleno
    JPanel x = new JPanel(new GridLayout());
    x.setPreferredSize(new Dimension(100, 0));
    x.setBackground(Color.white);
    panel.getjPanelContent().add(x, BorderLayout.LINE_START);
    JPanel y = new JPanel(new GridLayout());
    y.setPreferredSize(new Dimension(100, 0));
    y.setBackground(Color.white);
    panel.getjPanelContent().add(y, BorderLayout.LINE_END);
    JPanel z = new JPanel(new GridLayout());
    z.setBackground(Color.white);
    z.setPreferredSize(new Dimension(0, 40));
    panel.getjPanelContent().add(z, BorderLayout.PAGE_END);

    return panel;
}

From source file:ecg.ecgshow.ECGShowUI.java

private void createBloodOxygenData(long timeZone) {
    BloodOxygendatas = new short[2];
    BloodOxygenData = new JPanel();
    BloodOxygenData.setLayout(new FlowLayout());
    BloodOxygenData.setBounds(0, 0, (int) (WIDTH * 0.14), (int) (HEIGHT * 0.15));
    BloodOxygenData.setBackground(Color.BLACK);

    JLabel jLabel1 = new JLabel("---");
    if (BloodOxygendatas[0] == 0x00 || BloodOxygendatas == null) {
        jLabel1.setText("---");
    } else {/* w w  w.ja v a 2  s  .  co  m*/
        jLabel1.setText(Short.toString((short) BloodOxygendatas[0]));
    }
    System.out.println("BloodOxygendatas" + Short.toString(BloodOxygendatas[0]));
    jLabel1.setFont(loadFont("LED.tff", (float) (HEIGHT * 0.070)));
    jLabel1.setBackground(Color.BLACK);
    jLabel1.setForeground(Color.GREEN);
    jLabel1.setBounds(0, 0, 100, 100);
    jLabel1.setOpaque(true);

    JLabel jLabelName = new JLabel(" ");
    jLabelName.setFont(new Font("SansSerif", 0, (int) (HEIGHT * 0.020)));
    jLabelName.setBackground(Color.BLACK);
    jLabelName.setForeground(new Color(237, 65, 43));
    jLabelName.setBounds(0, 0, 100, 100);
    jLabelName.setOpaque(true); //??

    JLabel jLabelUnit = new JLabel(" %");
    jLabelUnit.setFont(new Font("SansSerif", 0, (int) (HEIGHT * 0.020)));
    jLabelUnit.setBackground(Color.BLACK);
    jLabelUnit.setForeground(Color.GREEN);
    jLabelUnit.setBounds(0, 0, 100, 100);
    jLabelUnit.setOpaque(true); //??

    BloodOxygenData.add(jLabelName);
    BloodOxygenData.add(jLabel1);
    BloodOxygenData.add(jLabelUnit);

    ScheduledExecutorService scheduledExecutorService = Executors.newSingleThreadScheduledExecutor();
    scheduledExecutorService.scheduleAtFixedRate(new Runnable() {
        @Override
        public void run() {
            if (BloodOxygendatas[0] == 0 || HeartRatedatas[0] == -100) {
                jLabel1.setText("--");
            } else {
                jLabel1.setText(String.valueOf(BloodOxygendatas[0]));
            }
            BloodOxygenData.repaint();
        }
    }, 0, 3, TimeUnit.SECONDS);
}

From source file:JXTransformer.java

private JPanel createDemoPanel() {
        JPanel buttonPanel = new JPanel(new GridLayout(3, 2));
        TitledBorder titledBorder = BorderFactory.createTitledBorder("Try three sliders below !");
        Font titleFont = titledBorder.getTitleFont();
        titledBorder.setTitleFont(titleFont.deriveFont(titleFont.getSize2D() + 10));
        titledBorder.setTitleJustification(TitledBorder.CENTER);
        buttonPanel.setBorder(titledBorder);
        JButton b = new JButton("JButton");
        b.setPreferredSize(new Dimension(100, 50));
        buttonPanel.add(createTransformer(b));

        Vector<String> v = new Vector<String>();
        v.add("One");
        v.add("Two");
        v.add("Three");
        JList list = new JList(v);
        buttonPanel.add(createTransformer(list));

        buttonPanel.add(createTransformer(new JCheckBox("JCheckBox")));

        JSlider slider = new JSlider(0, 100);
        slider.setLabelTable(slider.createStandardLabels(25, 0));
        slider.setPaintLabels(true);/* w  w  w  .  j av  a2s.c om*/
        slider.setPaintTicks(true);
        slider.setMajorTickSpacing(10);
        buttonPanel.add(createTransformer(slider));

        buttonPanel.add(createTransformer(new JRadioButton("JRadioButton")));
        final JLabel label = new JLabel("JLabel");
        label.addMouseListener(new MouseAdapter() {
            public void mouseEntered(MouseEvent e) {
                Font font = label.getFont();
                label.setFont(font.deriveFont(font.getSize2D() + 10));
            }

            public void mouseExited(MouseEvent e) {
                Font font = label.getFont();
                label.setFont(font.deriveFont(font.getSize2D() - 10));
            }
        });
        buttonPanel.add(createTransformer(label));

        return buttonPanel;
    }

From source file:com.floreantpos.ui.views.payment.GroupSettleTicketDialog.java

private JPanel createTotalViewerPanel() {

    JLabel lblSubtotal = new javax.swing.JLabel();
    lblSubtotal.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    lblSubtotal.setText(com.floreantpos.POSConstants.SUBTOTAL + ":" + " " + CurrencyUtil.getCurrencySymbol()); //$NON-NLS-1$ //$NON-NLS-2$

    tfSubtotal = new javax.swing.JTextField(10);
    tfSubtotal.setHorizontalAlignment(SwingConstants.TRAILING);
    tfSubtotal.setEditable(false);// w  w w  . j a  v  a 2 s .c  o  m

    JLabel lblDiscount = new javax.swing.JLabel();
    lblDiscount.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    lblDiscount.setText(Messages.getString("TicketView.9") + " " + CurrencyUtil.getCurrencySymbol()); //$NON-NLS-1$ //$NON-NLS-2$

    tfDiscount = new javax.swing.JTextField(10);
    tfDiscount.setHorizontalAlignment(SwingConstants.TRAILING);
    tfDiscount.setEditable(false);

    JLabel lblDeliveryCharge = new javax.swing.JLabel();
    lblDeliveryCharge.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    lblDeliveryCharge.setText("Delivery Charge:" + " " + CurrencyUtil.getCurrencySymbol()); //$NON-NLS-1$ //$NON-NLS-2$

    tfDeliveryCharge = new JTextField(10);
    tfDeliveryCharge.setHorizontalAlignment(SwingConstants.TRAILING);
    tfDeliveryCharge.setEditable(false);

    JLabel lblTax = new javax.swing.JLabel();
    lblTax.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    lblTax.setText(com.floreantpos.POSConstants.TAX + ":" + " " + CurrencyUtil.getCurrencySymbol()); //$NON-NLS-1$ //$NON-NLS-2$

    tfTax = new javax.swing.JTextField();
    tfTax.setEditable(false);
    tfTax.setHorizontalAlignment(SwingConstants.TRAILING);

    JLabel lblGratuity = new javax.swing.JLabel();
    lblGratuity.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    lblGratuity
            .setText(Messages.getString("SettleTicketDialog.5") + ":" + " " + CurrencyUtil.getCurrencySymbol()); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$

    tfGratuity = new javax.swing.JTextField();
    tfGratuity.setEditable(false);
    tfGratuity.setHorizontalAlignment(SwingConstants.TRAILING);

    JLabel lblTotal = new javax.swing.JLabel();
    lblTotal.setFont(lblTotal.getFont().deriveFont(Font.BOLD, 18));
    lblTotal.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    lblTotal.setText(com.floreantpos.POSConstants.TOTAL + ":" + " " + CurrencyUtil.getCurrencySymbol()); //$NON-NLS-1$ //$NON-NLS-2$

    tfTotal = new javax.swing.JTextField(10);
    tfTotal.setFont(tfTotal.getFont().deriveFont(Font.BOLD, 18));
    tfTotal.setHorizontalAlignment(SwingConstants.TRAILING);
    tfTotal.setEditable(false);

    JPanel ticketAmountPanel = new com.floreantpos.swing.TransparentPanel(
            new MigLayout("hidemode 3,ins 2 2 3 2,alignx trailing,fill", "[grow][]", "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

    ticketAmountPanel.add(lblSubtotal, "growx,aligny center"); //$NON-NLS-1$
    ticketAmountPanel.add(tfSubtotal, "growx,aligny center"); //$NON-NLS-1$
    ticketAmountPanel.add(lblDiscount, "newline,growx,aligny center"); //$NON-NLS-1$ //$NON-NLS-2$
    ticketAmountPanel.add(tfDiscount, "growx,aligny center"); //$NON-NLS-1$
    ticketAmountPanel.add(lblTax, "newline,growx,aligny center"); //$NON-NLS-1$
    ticketAmountPanel.add(tfTax, "growx,aligny center"); //$NON-NLS-1$
    ticketAmountPanel.add(lblDeliveryCharge, "newline,growx,aligny center"); //$NON-NLS-1$
    ticketAmountPanel.add(tfDeliveryCharge, "growx,aligny center"); //$NON-NLS-1$
    ticketAmountPanel.add(lblGratuity, "newline,growx,aligny center"); //$NON-NLS-1$
    ticketAmountPanel.add(tfGratuity, "growx,aligny center"); //$NON-NLS-1$
    ticketAmountPanel.add(lblTotal, "newline,growx,aligny center"); //$NON-NLS-1$
    ticketAmountPanel.add(tfTotal, "growx,aligny center"); //$NON-NLS-1$

    return ticketAmountPanel;
}

From source file:lol.search.RankedStatsPage.java

private void totalJLabel(JLabel label, String text, Color color) {
    label.setText(text);/*  w w  w. j ava2s. co  m*/
    label.setForeground(color);
    label.setFont(new Font("Sen-Regular", Font.CENTER_BASELINE, 16)); //custom font
}

From source file:com.prezerak.windmill.gui.AveragesPanel.java

@Override
public void run() {
    // TODO Auto-generated method stub
    ButtonModel btnModelAvg = WindMill.mainFrame.getAvgButtonGroup().getSelection();
    long pollInterval = Long.parseLong(btnModelAvg.getActionCommand()) * 1000;

    if (pollInterval != 0 && endDate - startDate < pollInterval) {

        waitDlg.setVisible(false);/*from www .ja  va  2  s  .  co m*/
        waitDlg.removeAll();
        waitDlg.dispose();

        JLabel lbl = new JLabel("Choose either a longer duration or a smaller average period !!!");
        lbl.setFont(new Font("Tahoma", Font.BOLD, 11));
        JOptionPane.showMessageDialog(null, lbl);
        if (WindMill.mainFrame.getMode() == MainFrameModes.REAL_TIME_MODE)
            WindMill.mainFrame.showRealTimeFrame();

    } else {

        cleanUp(true);
        runSequence();
        WindMill.mainFrame.addToDisplayPanel();
        waitDlg.setVisible(false);
        waitDlg.removeAll();
        waitDlg.dispose();
    }

}

From source file:com.sshtools.appframework.ui.SshToolsApplication.java

/**
 * Show an 'About' dialog/*from ww w . j  a v  a  2s  .c  om*/
 */
public void showAbout(Component parent) {
    JPanel p = new JPanel(new GridBagLayout());
    p.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
    GridBagConstraints gBC = new GridBagConstraints();
    gBC.anchor = GridBagConstraints.CENTER;
    gBC.fill = GridBagConstraints.HORIZONTAL;
    gBC.insets = new Insets(1, 1, 1, 1);
    JLabel a = new JLabel(getApplicationName());
    a.setFont(a.getFont().deriveFont(24f));
    UIUtil.jGridBagAdd(p, a, gBC, GridBagConstraints.REMAINDER);
    JLabel v = new JLabel("Version " + getApplicationVersion());
    v.setFont(v.getFont().deriveFont(10f));
    UIUtil.jGridBagAdd(p, v, gBC, GridBagConstraints.REMAINDER);
    MultilineLabel x = new MultilineLabel(getAboutLicenseDetails());
    x.setBorder(BorderFactory.createEmptyBorder(8, 0, 8, 0));
    x.setFont(x.getFont().deriveFont(12f));
    UIUtil.jGridBagAdd(p, x, gBC, GridBagConstraints.REMAINDER);
    MultilineLabel c = new MultilineLabel(getExpiryInfo());
    c.setFont(c.getFont().deriveFont(10f));
    UIUtil.jGridBagAdd(p, c, gBC, GridBagConstraints.REMAINDER);
    final JLabel h = new JLabel(getAboutURL());
    h.setForeground(Color.blue);
    h.setFont(new Font(h.getFont().getName(), Font.BOLD, 10));
    h.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
    h.addMouseListener(new MouseAdapter() {
        @Override
        public void mouseClicked(MouseEvent evt) {
            try {
                BrowserLauncher.openURL(getAboutURL());
            } catch (IOException ioe) {
                ioe.printStackTrace();
            }
        }
    });
    UIUtil.jGridBagAdd(p, h, gBC, GridBagConstraints.REMAINDER);
    JOptionPane.showMessageDialog(parent, p, "About", JOptionPane.PLAIN_MESSAGE, getApplicationLargeIcon());
}

From source file:com.francetelecom.rd.dashboard.pc.DashboardPC.java

private void initDashboardWithRules() {
    // get existing rules and display them
    try {//from  ww  w.  j a  v a  2s.c  o  m
        Rule[] ruleList = busConnector.getAllRules();
        for (int i = 0; i < ruleList.length; i++) {
            if (!ruleList[i].isPrivate())
                addRulePanelToDashboard(ruleList[i].getId());
        }
    } catch (HomeBusException e) {
        logger.error("Could not retrieve bus rules : " + e.getMessage());
        e.printStackTrace();
    }

    // small add rule panel init
    JPanel panelAddRule = new JPanel();
    panelAddRule.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    panelAddRule.setLayout(null);

    JLabel addRuleLbl = new JLabel("Configure new rule");
    addRuleLbl.setHorizontalAlignment(SwingConstants.CENTER);
    addRuleLbl.setForeground(new Color(169, 169, 169));
    addRuleLbl.setFont(new Font("Arial", Font.BOLD, 13));
    addRuleLbl.setBounds(10, 25, 229, 27);
    panelAddRule.add(addRuleLbl);

    JButton addRuleBtn = new JButton("+");
    addRuleBtn.setForeground(new Color(128, 128, 128));
    addRuleBtn.setBounds(100, 57, 41, 23);
    panelAddRule.add(addRuleBtn);

    rulesContent.add(panelAddRule);
    myRulePanelMap.put("0", panelAddRule);
    updateRuleListDisplay();

    // add panel elements : photo, service friendly name, IF label, condition parameter
    JPanel panelRule1 = new JPanel();
    panelRule1.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    panelRule1.setLayout(null);

    JPanel rulePanelServicePhoto1 = new JPanel();
    rulePanelServicePhoto1.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    rulePanelServicePhoto1.setBounds(10, 16, 27, 27);
    panelRule1.add(rulePanelServicePhoto1);

    String serviceName1 = "Visio TV";
    JLabel ruleLblServiceName1 = new JLabel(serviceName1);
    ruleLblServiceName1.setFont(new Font("Arial", Font.BOLD, 15));
    ruleLblServiceName1.setForeground(new Color(100, 149, 237));
    ruleLblServiceName1.setBounds(47, 11, 212, 18);
    panelRule1.add(ruleLblServiceName1);

    String serviceDeviceOwner1 = "Set-top Box";
    JLabel ruleLblOnDevice1 = new JLabel("on " + serviceDeviceOwner1);
    ruleLblOnDevice1.setForeground(Color.GRAY);
    ruleLblOnDevice1.setFont(new Font("Arial", Font.PLAIN, 11));
    ruleLblOnDevice1.setBounds(47, 29, 212, 14);
    panelRule1.add(ruleLblOnDevice1);

    JLabel ruleLblIf1 = new JLabel("IF");
    ruleLblIf1.setForeground(Color.GRAY);
    ruleLblIf1.setFont(new Font("Arial", Font.BOLD, 30));
    ruleLblIf1.setBounds(10, 49, 27, 35);
    panelRule1.add(ruleLblIf1);

    // condition 
    String condition1 = "IncomingVoIP" + " = " + "true";
    JLabel ruleLblConditionParam1 = new JLabel(condition1);
    ruleLblConditionParam1.setFont(new Font("Arial", Font.BOLD, 13));
    ruleLblConditionParam1.setForeground(Color.GRAY);
    ruleLblConditionParam1.setBounds(47, 49, 192, 35);
    panelRule1.add(ruleLblConditionParam1);

    myRulePanelMap.put("1", panelRule1);
    rulesContent.add(panelRule1);

    // add panel elements : photo, service friendly name, IF label, condition parameter
    JPanel panelRule2 = new JPanel();
    panelRule2.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    panelRule2.setLayout(null);

    JPanel rulePanelServicePhoto2 = new JPanel();
    rulePanelServicePhoto2.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    rulePanelServicePhoto2.setBounds(10, 16, 27, 27);
    panelRule2.add(rulePanelServicePhoto2);

    String serviceName2 = "Wi-Fi Off";
    JLabel ruleLblServiceName2 = new JLabel(serviceName2);
    ruleLblServiceName2.setFont(new Font("Arial", Font.BOLD, 15));
    ruleLblServiceName2.setForeground(new Color(100, 149, 237));
    ruleLblServiceName2.setBounds(47, 11, 212, 18);
    panelRule2.add(ruleLblServiceName2);

    String serviceDeviceOwner2 = "Livebox";
    JLabel ruleLblOnDevice2 = new JLabel("on " + serviceDeviceOwner2);
    ruleLblOnDevice2.setForeground(Color.GRAY);
    ruleLblOnDevice2.setFont(new Font("Arial", Font.PLAIN, 11));
    ruleLblOnDevice2.setBounds(47, 29, 212, 14);
    panelRule2.add(ruleLblOnDevice2);

    JLabel ruleLblIf2 = new JLabel("IF");
    ruleLblIf2.setForeground(Color.GRAY);
    ruleLblIf2.setFont(new Font("Arial", Font.BOLD, 30));
    ruleLblIf2.setBounds(10, 49, 27, 35);
    panelRule2.add(ruleLblIf2);

    // condition 
    String condition2 = "Absence" + " = " + "true";
    JLabel ruleLblConditionParam2 = new JLabel(condition2);
    ruleLblConditionParam2.setFont(new Font("Arial", Font.BOLD, 13));
    ruleLblConditionParam2.setForeground(Color.GRAY);
    ruleLblConditionParam2.setBounds(47, 49, 192, 35);
    panelRule2.add(ruleLblConditionParam2);

    myRulePanelMap.put("2", panelRule2);
    rulesContent.add(panelRule2);

    updateRuleListDisplay();

    busConnector.addRuleDefinitionsListener(this);
}