convex.gui.components.CodeLabel Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of convex-gui Show documentation
Show all versions of convex-gui Show documentation
Convex desktop GUI and test applications
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);
}
}