All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.stanford.smi.protege.util.MessagePanel Maven / Gradle / Ivy

Go to download

Core code for the Protege ontology editor. Serves as the basis for the Protege-Frames and Protege-OWL editors.

There is a newer version: 3.5.1
Show newest version
package edu.stanford.smi.protege.util;

import javax.swing.*;

/**
 * Displays a possibly multiline message.
 *
 * @author    Ray Fergerson 
 */
public class MessagePanel extends JPanel {

    private static final long serialVersionUID = -1418928771375394463L;

    public MessagePanel(String text) {
        setLayout(new java.awt.BorderLayout());
        JTextArea area = new JTextArea(text);

        // configure the text area to look like a label except that it can handle carriage returns
        JLabel label = ComponentFactory.createLabel();
        area.setEditable(false);
        area.setBackground(label.getBackground());
        area.setForeground(label.getForeground());
        area.setFont(label.getFont());

        add(area);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy