javax.swing.JScrollPane.setLocation()方法的使用及代码示例

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

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

JScrollPane.setLocation介绍

暂无

代码示例

代码示例来源:origin: org.owasp.jbrofuzz/jbrofuzz

aboutScroll.setVerticalScrollBarPolicy(20);
aboutScroll.setHorizontalScrollBarPolicy(30);
aboutScroll.setLocation(140, 5);
aboutScroll.setSize(290, 185);

代码示例来源:origin: org.owasp.jbrofuzz/jbrofuzz

private JComponent createCode() {
  final JLabel codeLabel = new JLabel(ImageCreator.IMG_OWASP);
  codeLabel.setLocation(20, 45);
  codeLabel.setSize(100, 100);
  final URL codeURL = ClassLoader.getSystemClassLoader()
  .getResource("LICENSE/CODE.txt");
  JEditorPane code; 
  try {
    code = new JEditorPane(codeURL);
    
  } catch (final IOException eAbout) {
    code = new JEditorPane();
    code.setText("Code information cannot be found!");
  }
  code.setEditable(false);
  code.addKeyListener(this);
  
  final JScrollPane codeScroll = new JScrollPane(code);
  codeScroll.setVerticalScrollBarPolicy(20);
  codeScroll.setHorizontalScrollBarPolicy(30);
  codeScroll.setLocation(140, 5);
  codeScroll.setSize(290, 185);
  
  final JPanel codePanel = new JPanel();
  codePanel.setLayout(null);
  codePanel.add(codeLabel);
  codePanel.add(codeScroll);
  return codePanel;
}

代码示例来源:origin: org.owasp.jbrofuzz/jbrofuzz

disclaimerScroll.setVerticalScrollBarPolicy(20);
disclaimerScroll.setHorizontalScrollBarPolicy(30);
disclaimerScroll.setLocation(140, 5);
disclaimerScroll.setSize(290, 185);

代码示例来源:origin: edu.illinois.cs.cogcomp/DatalessClassification

public void display_esa(List<ConceptData> cDoc){
    panel1 = new JPanel();
    final JTextArea textArea = new JTextArea(5, 30);
    JScrollPane scrollPane = new JScrollPane(textArea);
    scrollPane.setPreferredSize(new Dimension(500, 400));
    textArea.setLineWrap(true);
    textArea.setWrapStyleWord(true);
    textArea.setEditable(false);
    scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    for (ConceptData key : cDoc) {
      textArea.append(key.concept + ", \t" + String.format("%.4f", key.score)+"\n");
    }
    textArea.setCaretPosition(textArea.getDocument().getLength());
    //window.setLayout(new FlowLayout());
    JButton back=new JButton("Go Back");
    back.setBounds(30,50,550,430);
    back.addActionListener(back());
    panel1.add(back);
    scrollPane.setLocation(30, 150);
    panel1.add(scrollPane);
    window.remove(myPanel);
    window.setContentPane(panel1);
    window.validate();
    window.repaint();

}

代码示例来源:origin: net.java.abeille/abeille

/** @param parent */
public void layoutContainer(Container parent) {
  Dimension margin_sz = m_colmargin.getPreferredSize();
  Insets insets = parent.getInsets();
  int colm_x = insets.left + margin_sz.width;
  int colm_y = insets.top;
  int colm_width = parent.getWidth() - insets.right - colm_x;
  int colm_height = margin_sz.height;
  int rowm_x = insets.left;
  int rowm_y = insets.top + margin_sz.height;
  int rowm_width = margin_sz.width;
  int rowm_height = parent.getHeight() - insets.bottom - rowm_y;
  m_scroll.setLocation(colm_x, rowm_y);
  m_scroll.setSize(colm_width, rowm_height);
  m_colmargin.setLocation(colm_x, colm_y);
  m_colmargin.setSize(colm_width, colm_height);
  m_rowmargin.setLocation(rowm_x, rowm_y);
  m_rowmargin.setSize(rowm_width, rowm_height);
}

代码示例来源:origin: com.eas.platypus/platypus-js-forms

@ScriptFunction
@Override
public void setLeft(int aValue) {
  if (super.getParent() != null && super.getParent().getLayout() instanceof MarginLayout) {
    MarginLayout.ajustLeft(this, aValue);
  }
  super.setLocation(aValue, getTop());
}

代码示例来源:origin: com.eas.platypus/platypus-js-forms

@ScriptFunction
@Override
public void setTop(int aValue) {
  if (super.getParent() != null && super.getParent().getLayout() instanceof MarginLayout) {
    MarginLayout.ajustTop(this, aValue);
  }
  super.setLocation(getLeft(), aValue);
}

代码示例来源:origin: com.eas.platypus/platypus-js-scalable-widget

sp.setLocation(290, 20);
sp.setSize(250, 350);
sp1.setLocation(290, 390);
sp1.setSize(250, 150);

代码示例来源:origin: dkpro/dkpro-jwpl

/**
 * A call of this method should validate the positions of the panels
 * components.
 */
@Override
public void relocate()
{
  int w = 555, h = 235;
  int x = (this.getWidth() - w) / 2, y = (this.getHeight() - h) / 2;
  archiveScrollPane.setLocation(x, y);
  addArchiveButton.setLocation(x + 435, y + 10);
  removeArchiveButton.setLocation(x + 435, y + 40);
  encodingLabel.setLocation(x, y + 220);
  encodingField.setLocation(x + 210, y + 220);
  surrogatePanel.setLocation(x + 415, y + 85);
}

代码示例来源:origin: de.tudarmstadt.ukp.wikipedia/de.tudarmstadt.ukp.wikipedia.revisionmachine

/**
 * A call of this method should validate the positions of the panels
 * components.
 */
@Override
public void relocate()
{
  int w = 555, h = 235;
  int x = (this.getWidth() - w) / 2, y = (this.getHeight() - h) / 2;
  archiveScrollPane.setLocation(x, y);
  addArchiveButton.setLocation(x + 435, y + 10);
  removeArchiveButton.setLocation(x + 435, y + 40);
  encodingLabel.setLocation(x, y + 220);
  encodingField.setLocation(x + 210, y + 220);
  surrogatePanel.setLocation(x + 415, y + 85);
}

相关文章

JScrollPane类方法