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

convex.gui.components.CodeLabel Maven / Gradle / Ivy

The newest version!
package convex.gui.components;

import javax.swing.JTextArea;

import convex.core.text.Text;
import convex.gui.utils.Toolkit;

/**
 * A simple label for multi-line text / code components
 */
@SuppressWarnings("serial")
public class CodeLabel extends JTextArea {

	public CodeLabel() {
		this("");
	}
	
	public CodeLabel(String text) {
		super(Text.lineCount(text),0);
		this.setText(text);
		this.setEditable(false);
		this.setFont(Toolkit.MONO_FONT);
		
		RightCopyMenu.addTo(this);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy