本文整理了Java中javax.swing.JTextArea.setLocation()
方法的一些代码示例,展示了JTextArea.setLocation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextArea.setLocation()
方法的具体详情如下:
包路径:javax.swing.JTextArea
类名称:JTextArea
方法名:setLocation
暂无
代码示例来源:origin: edu.illinois.cs.cogcomp/DatalessClassification
public void result_panel(HashMap<Integer, List<LabelKeyValuePair>> labelResultsInDepth){
m= new JFrame("Customized Tree");
m.setSize(500, 300);
panel3 = new JPanel();
JTextArea text3 = new JTextArea();
text3.setSize(400,200);
text3.setLocation(30, 30);
text3.setLineWrap(true);
text3.setMaximumSize( text3.getPreferredSize() );
int size=labelResultsInDepth.size()-1;
for(int j=0;j<labelResultsInDepth.get(size).size();j++){
text3.append("The label name is "+labelResultsInDepth.get(size).get(j).labelName+"\n");
}
panel3.add(text3);
m.setContentPane(panel3);
m.setVisible(true);
}
代码示例来源:origin: edu.illinois.cs.cogcomp/DatalessClassification
public void cTree_panel(final Controller controller){
m= new JFrame("Customized Tree");
m.setSize(700, 400);
panel3 = new JPanel();
panel3.setPreferredSize(new Dimension(400,400));
panel3.setLayout(null);
JButton dump_tree=new JButton("Dump Tree");
dump_tree.setBounds(30,50,150,30);
dump_tree.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String text = text1.getText();
controller.costumized_tree(text);
m.dispose();
}
});
panel3.add(dump_tree);
text1 = new JTextArea("Enter Text");
text1.setSize(400,200);
text1.setLocation(200, 50);
text1.setLineWrap(true);
text1.setMaximumSize( text1.getPreferredSize() );
panel3.add(text1);
m.setContentPane(panel3);
m.setVisible(true);
}
代码示例来源:origin: stackoverflow.com
description.setFont(new java.awt.Font("Tahoma", 0, 12));
movieDescription = new JTextArea();
movieDescription.setLocation(15, 320);
movieDescription.setSize(420, 110);
代码示例来源:origin: triplea-game/triplea
label.setFocusable(true);
label.setWrapStyleWord(true);
label.setLocation(0, 0);
dialog.setBackground(label.getBackground());
dialog.setLayout(new BorderLayout());
代码示例来源:origin: triplea-game/triplea
label.setFocusable(false);
label.setWrapStyleWord(true);
label.setLocation(0, 0);
dialog.setBackground(label.getBackground());
dialog.setLayout(new BorderLayout());
代码示例来源:origin: edu.illinois.cs.cogcomp/DatalessClassification
text = new JTextArea("Enter Text");
text.setSize(400,200);
text.setLocation(250, 50);
text.setLineWrap(true);
text.setMaximumSize( text.getPreferredSize() );
代码示例来源:origin: stackoverflow.com
renderer.setLocation(e.getPoint());
add(renderer);
代码示例来源:origin: sarahtattersall/PIPE
/**
* Calculates the BoundsOffsets used for setBounds() method
*
* Implemented because the canvas has no layout manager
*
*/
public void updateBounds() {
int newHeight = noteText.getPreferredSize().height;
if (noteText.getHeight() < newHeight && newHeight >= noteText.getMinimumSize().height) {
noteText.setSize(noteText.getWidth(), newHeight);
}
int rectWidth = noteText.getWidth() + GUIConstants.RESERVED_BORDER;
int rectHeight = noteText.getHeight() + GUIConstants.RESERVED_BORDER;
noteRect.setFrame(GUIConstants.RESERVED_BORDER / 2, GUIConstants.RESERVED_BORDER / 2, rectWidth, rectHeight);
setSize(rectWidth + GUIConstants.ANNOTATION_SIZE_OFFSET, rectHeight + GUIConstants.ANNOTATION_SIZE_OFFSET);
noteText.setLocation((int) noteRect.getX() + (rectWidth - noteText.getWidth()) / 2,
(int) noteRect.getY() + (rectHeight - noteText.getHeight()) / 2);
bounds.setBounds(model.getX() - 20, model.getY() - 20,
rectWidth + GUIConstants.RESERVED_BORDER + GUIConstants.ANNOTATION_SIZE_OFFSET + 20,
rectHeight + GUIConstants.RESERVED_BORDER + GUIConstants.ANNOTATION_SIZE_OFFSET + 20);
setBounds(bounds);
}
内容来源于网络,如有侵权,请联系作者删除!