本文整理了Java中javax.swing.JTextArea.setOpaque()
方法的一些代码示例,展示了JTextArea.setOpaque()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextArea.setOpaque()
方法的具体详情如下:
包路径:javax.swing.JTextArea
类名称:JTextArea
方法名:setOpaque
暂无
代码示例来源:origin: runelite/runelite
notesContainer.setBackground(ColorScheme.DARKER_GRAY_COLOR);
notesEditor.setOpaque(false);
代码示例来源:origin: stackoverflow.com
textArea.setLineWrap(true);
textArea.setWrapStyleWord(true);
textArea.setOpaque(false);
textArea.setEditable(false);
代码示例来源:origin: geotools/geotools
/**
* Retourne une étiquette pour la composante spécifiée. Le texte de l'étiquette pourra
* éventuellement être distribué sur plusieurs lignes.
*
* @param owner Composante pour laquelle on construit une étiquette. L'étiquette aura la même
* largeur que {@code owner}.
* @param text Texte à placer dans l'étiquette.
*/
public static JComponent getMultilineLabelFor(final JComponent owner, final String text) {
final JTextArea label = new JTextArea(text);
final Dimension size = owner.getPreferredSize();
size.height = label.getMaximumSize().height;
label.setMaximumSize(size);
label.setWrapStyleWord(true);
label.setLineWrap(true);
label.setEditable(false);
label.setFocusable(false);
label.setOpaque(false);
label.setBorder(null); // Certains L&F placent une bordure.
LookAndFeel.installColorsAndFont(
label, "Label.background", "Label.foreground", "Label.font");
return label;
}
代码示例来源:origin: jshiell/checkstyle-idea
/**
* Initialise the view.
*/
private void initialise() {
// fake a multi-line label with a text area
descriptionLabel.setText(CheckStyleBundle.message("config.inspection.description"));
descriptionLabel.setEditable(false);
descriptionLabel.setEnabled(false);
descriptionLabel.setWrapStyleWord(true);
descriptionLabel.setLineWrap(true);
descriptionLabel.setOpaque(false);
descriptionLabel.setDisabledTextColor(descriptionLabel.getForeground());
final GridBagConstraints descLabelConstraints = new GridBagConstraints(
0, 0, 3, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST,
GridBagConstraints.BOTH, JBUI.insets(4), 0, 0);
add(descriptionLabel, descLabelConstraints);
}
代码示例来源:origin: org.netbeans.api/org-openide-dialogs
this.contentNumbered = contentNumbered;
ta.setOpaque(false);
ta.setEditable(false);
ta.setLineWrap(true);
代码示例来源:origin: winder/Universal-G-Code-Sender
private void initComponents() {
// MigLayout... 3rd party layout library.
setLayout(new MigLayout("fillx, wrap 2, inset 5", "grow"));
add(rowsLabel, AL_RIGHT);
add(rowsValue);
add(sentRowsLabel, AL_RIGHT);
add(sentRowsValue);
add(remainingRowsLabel, AL_RIGHT);
add(remainingRowsValue);
add(remainingTimeLabel, AL_RIGHT);
add(remainingTimeValue);
add(durationLabel, AL_RIGHT);
add(durationValue);
add(latestCommentLabel, "span 2, wrap");
add(latestCommentValueLabel, "growx, span 2, wrap, wmin 10");
latestCommentValueLabel.setOpaque(false);
latestCommentValueLabel.setWrapStyleWord(true);
latestCommentValueLabel.setLineWrap(true);
}
代码示例来源:origin: info.aduna.clustermap/aduna-clustermap-core
protected JTextArea createTextArea(String text) {
JTextArea textArea = new JTextArea(text);
textArea.setOpaque(false);
textArea.setLineWrap(true);
textArea.setWrapStyleWord(true);
return textArea;
}
代码示例来源:origin: stackoverflow.com
JTextArea ta = new JTextArea();
ta.setEditable(false);
ta.setLineWrap(true);
ta.setOpaque(false);
ta.setWrapStyleWord(false); // This makes wrapping on char boundaries, and I think is the default value
代码示例来源:origin: stackoverflow.com
JTextArea textArea = new JTextArea();
textArea.setEditable(false);
textArea.setLineWrap(true);
textArea.setOpaque(false);
textArea.setBorder(BorderFactory.createEmptyBorder());
add(textArea, BorderLayout.CENTER);
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-apisupport-wizards
static JComponent warningPanel() throws MissingResourceException {
JTextArea a = new JTextArea();
a.setEditable(false);
a.setText(org.openide.util.NbBundle.getMessage(BasicSettingsPanel.class, "MSG_ReallyLaunch", new Object[]{}));
a.setOpaque(false);
return a;
}
代码示例来源:origin: net.sf.ingenias/editor
public TextAreaCellRenderer ()
{
this.myText = new JTextArea();
this.myText.setLineWrap(true);
this.myText.setWrapStyleWord(true);
this.myText.setOpaque(true);
this.myText.setEditable(false);
}
代码示例来源:origin: stackoverflow.com
JTextArea tArea = new JTextArea(lineholder.length, 50);
tArea.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 10));
tArea.setText(sb.toString());
tArea.setOpaque(false);
JOptionPane.showMessageDialog(null, tArea);
代码示例来源:origin: stackoverflow.com
JTextArea ta = new JTextArea("A JTextArea containing a long text");
ta.setLineWrap(true);
ta.setWrapStyleWord(true);
ta.setOpaque(false);
ta.setEditable(false);
ta.setFocusable(false);
代码示例来源:origin: sc.fiji/TrackMate_
@Override
public void startEditing( final Object cell, final EventObject evt )
{
textArea.setOpaque( true );
textArea.setBorder( BorderFactory.createLineBorder( Color.ORANGE, 1 ) );
super.startEditing( cell, evt );
}
};
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-dlight-nativeexecution-nb
private JComponent createMessageComponent(String message) {
final JTextArea textArea = new JTextArea(message.trim());
int fontSize = textArea.getFont().getSize();
textArea.setFont(new Font("Monospaced", Font.PLAIN, fontSize)); //NOI18N
textArea.setEditable(false);
textArea.setOpaque(false);
return textArea;
}
代码示例来源:origin: stackoverflow.com
JTextArea textArea = new JTextArea();
textArea.setOpaque(false);
textArea.setBackground(new Color(red, green, blue, alpha));
JScrollPane scrollPane = new JScrollPane(textArea);
scrollPane.getViewport().setOpaque(false);
scrollPane.setOpaque(false);
代码示例来源:origin: cytoscape.corelibs/task
private JTextArea createErrorTextArea(String msg) {
msg = StringWrap.wrap(msg, 50, "\n", false);
JTextArea errorArea = new JTextArea(msg);
errorArea.setEditable(false);
errorArea.setOpaque(false);
Font font = errorArea.getFont();
errorArea.setFont(new Font(font.getFamily(), Font.BOLD, font.getSize()-1));
errorArea.setBorder(new EmptyBorder(10, 10, 0, 10));
return errorArea;
}
代码示例来源:origin: cytoscape.corelibs/task
private JTextArea createTipTextArea(String tip) {
tip = StringWrap.wrap(tip, 50, "\n", false);
JTextArea tipArea = new JTextArea(tip);
tipArea.setEditable(false);
tipArea.setOpaque(false);
Font font = tipArea.getFont();
tipArea.setFont(new Font(font.getFamily(), Font.PLAIN, font.getSize()));
tipArea.setBorder(new EmptyBorder(10, 10, 10, 10));
return tipArea;
}
代码示例来源:origin: stackoverflow.com
JTextArea textArea = new JTextArea(text);
textArea.setFont(g.getFont().deriveFont(30f));
textArea.setOpaque(false);
textArea.setWrapStyleWord(true);
textArea.setLineWrap(true);
textArea.setBounds(0, 0, image.getWidth(), image.getHeight());
textArea.paint(g);
代码示例来源:origin: tflobbe/solrmeter
private Component createErrorLabel() {
jTextAreaError = new JTextArea();
jTextAreaError.setEditable(false);
jTextAreaError.setOpaque(false);
jTextAreaError.setBorder(null);
jTextAreaError.setFont(new Font(jTextAreaError.getFont().getName(), jTextAreaError.getFont().getStyle(), 12));
jScrollPaneError = new JScrollPane(jTextAreaError);
jScrollPaneError.setVisible(false);
return jScrollPaneError;
}
内容来源于网络,如有侵权,请联系作者删除!