javax.swing.JTextArea.paint()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(195)

本文整理了Java中javax.swing.JTextArea.paint()方法的一些代码示例,展示了JTextArea.paint()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextArea.paint()方法的具体详情如下:
包路径:javax.swing.JTextArea
类名称:JTextArea
方法名:paint

JTextArea.paint介绍

暂无

代码示例

代码示例来源:origin: ron190/jsql-injection

@Override
public void paint(Graphics g) {
  // Fix #6350: ArrayIndexOutOfBoundsException on paint()
  try {
    super.paint(g);
  } catch (NullPointerException | ArrayIndexOutOfBoundsException e) {
    LOGGER.error(e.getMessage(), e);
  }
  
  if ("".equals(this.getText())) {
    this.drawPlaceholder(this, g, this.placeholderText);
  }
}

代码示例来源: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: org.fudaa.framework.ctulu/ctulu-bu

public void paint(Graphics _g) {
 BuLib.setAntialiasing(this, _g);
 super.paint(_g);
 if (drop_) {
  Rectangle r = getDropRect();
  // _g.setColor(new Color(255,128,0,64));
  // _g.fillRoundRect(r.x,r.y,r.width,r.height,9,9);
  _g.setColor(new Color(255, 128, 0));
  _g.drawRoundRect(r.x, r.y, r.width - 1, r.height - 1, 9, 9);
 }
}

代码示例来源:origin: org.apache.airavata/airavata-xbaya-gui

/**
 * @see org.apache.airavata.xbaya.ui.graph.NodeGUI#paint(java.awt.Graphics2D)
 */
@Override
protected void paint(Graphics2D g) {
  Point position = this.node.getPosition();
  this.textArea.setText(this.node.getMemo());
  Dimension preferredSize = this.textArea.getPreferredSize();
  Rectangle bounds = new Rectangle(position.x, position.y, preferredSize.width, preferredSize.height);
  this.textArea.setBounds(bounds);
  Graphics graphics = g.create(position.x, position.y, preferredSize.width, preferredSize.height);
  this.textArea.paint(graphics);
}

代码示例来源:origin: org.opencadc/cadc-upload-manager

super.paint(g);
g.setColor(getForeground());

相关文章

JTextArea类方法