Here you can find the source of makeLabelStyle(JTextArea textArea)
Parameter | Description |
---|---|
textArea | the text area to modify |
public static JTextArea makeLabelStyle(JTextArea textArea)
//package com.java2s; import javax.swing.*; public class Main { /**//from w w w . j a va2 s . c o m * Make a JTextArea to look like a JLabel * * @param textArea the text area to modify * @return the same text area */ public static JTextArea makeLabelStyle(JTextArea textArea) { // From: http://www.coderanch.com/t/338648/GUI/java/Multiple-lines-JLabel if (textArea == null) return null; textArea.setEditable(false); textArea.setCursor(null); textArea.setOpaque(false); textArea.setFocusable(false); return textArea; } }