Search in sources :

Example 1 with Logo

use of org.openecard.gui.swing.Logo in project open-ecard by ecsec.

the class MessageDialog method initComponents.

private void initComponents() {
    // Config GUI components
    headlineLabel.setFont(headlineLabel.getFont().deriveFont(Font.BOLD));
    messageLabel.setMargin(new Insets(0, 0, 0, 0));
    messageLabel.setEditable(false);
    messageLabel.setLineWrap(true);
    messageLabel.setWrapStyleWord(true);
    messageLabel.setFont(new JButton().getFont());
    JScrollPane scrollPane = new JScrollPane(messageLabel);
    scrollPane.setBorder(BorderFactory.createEmptyBorder());
    Logo logo = new Logo();
    // Config layout
    GroupLayout layout = new GroupLayout(this);
    setLayout(layout);
    layout.setAutoCreateGaps(true);
    layout.setAutoCreateContainerGaps(true);
    layout.setHorizontalGroup(layout.createSequentialGroup().addComponent(logo, 60, 60, 60).addGap(20).addGroup(layout.createParallelGroup().addComponent(headlineLabel).addComponent(scrollPane)));
    layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.Alignment.CENTER).addComponent(logo).addGroup(layout.createSequentialGroup().addComponent(headlineLabel).addComponent(scrollPane)));
}
Also used : JScrollPane(javax.swing.JScrollPane) Insets(java.awt.Insets) JButton(javax.swing.JButton) GroupLayout(javax.swing.GroupLayout) Logo(org.openecard.gui.swing.Logo)

Aggregations

Insets (java.awt.Insets)1 GroupLayout (javax.swing.GroupLayout)1 JButton (javax.swing.JButton)1 JScrollPane (javax.swing.JScrollPane)1 Logo (org.openecard.gui.swing.Logo)1